|
CS 371 - Introduction to Artificial Intelligence
Pre-Class and In-Class Activities |
Due: The work of each
class is due before the beginning of the next class.
To start, you will need to be working on a machine with Eclipse
and a web browser (or will need to hazard remotely working on our lab machines). Instructions for setting up your machine for remote work are at the page Tools for Working Remotely. If you would have difficulty accessing/configuring such a machine
please contact me.
- CS 371 home page
-
Tools for Working Remotely
-
My Office Hours are listed on the course information page.
-
Remember to do all readings and any assigned video exercises before each class.
-
Colloquia attendance will still be required. Make a habit of checking your gettysburg.edu email at least daily to get talk announcements.
-
Homework submission:
-
Make sure you have the following in the same, single directory:
-
README file containing: the Honor Pledge, your names, your student ID numbers, and any answers to required written portions of an assignment
-
any required .java source files. (There should be no “package” line at the top – use the “default package” by leaving the package blank in the New… Class form.)
-
Change to that directory in a BASH terminal window.
-
Enter the command “submit371 hw1” (or "hwN" for the Nth assignment)
-
Some seconds after doing so, you should see a file named “feedback.txt” appear in that same directory, providing confirmation of your submission and feedback concerning the submission. You can read this using command “less feedback.txt”. When using the less command, you can go forward one line pressing Enter, forward one page pressing Space, back one page pressing “b”, and quit from less pressing “q”.
-
Before class 1 ():
-
Class 1 ():
-
Before class 2 ():
-
Review of class 1 topics in more detail: (1:04:41)
-
Assigned readings
-
Watch and program along to these videos with new material: (36:24)
-
Class 2 ():
-
Questions and Answers for readings and videos
-
Download "Suit Yourself Solo" problem specification and generator: SuitYourselfSoloGenerator.java
-
Implement SearchNode subclass SuitYourselfSoloNode.java for problem "Suit Yourself Solo"
with a constructor having the same parameters as the problem generator. Optimization hint: Don't keep copying and updating the card deals. Instead, let your changing state be an array with the number of cards remaining in each pile.
-
Find the optimal (shortest) solution for "new SuitYourselfSoloNode(4, 13, 5, 0L);"
-
Before class 3 ():
-
Watch and program along with these videos:
-
Complete IterativeDeepeningDepthFirstSearcher.java for use in Class 3.
-
Class 3 ():
-
HW1 due class 4 - Any questions?
-
Create test code that runs IterativeDeepeningDepthFirstSearcher multiple
times with randomly generated TilePuzzleNodes with size 4 and a number of
shuffles that makes search take a long time (but with success).
-
See the performance impact of the simplest form of repeated state detection that we
covered in the videos.
-
Try different forms of repeated state detection as time permits. We'll
share our outcomes at the end of class.
-
Before class 4 ():
-
Class 4 ():
-
Overview HW2
-
Discuss potential admissible heuristics for HTilePuzzleNode
-
Implement different admissible HTilePuzzleNode heuristics and compare performance
-
Before Class 5 ():
-
Class 5 ():
-
Discuss representation of Preferred Group Formation problem.
-
Implement challenge problem in groups: Preferred Group Formation (group-input.txt)
-
Discuss tuning of Simulated Annealing for Preferred Group Formation problem.
-
Before class 6 ():
-
Complete Preferred Group Formation problem implementation and optimize given sample problem (group-input.txt).
Be able to share your share your solution in class.
-
Class 6 ():
-
Check solutions for (group-input.txt).
-
SLS Q&A
-
Overview HW3
-
Open ended SLS problem: Suppose a dozen or more students want to have pizza ordered for their event and you want to place the best pizza order for the group.
Assume that pizza toppings can be varied by half-pizza. Now students have many different preferences for (or against) toppings. Students also have different appetites.
Design a system to get student preferences and place and order that will in some sense be best for the group.
-
Before Class 7 ():
-
Class 7 ():
-
Alpha-beta pruning exercises in groups using common exercise tree.
Optional: You can generate your own practice exercises with GenAlphaBetaProblem.java.
-
Group 1: A=3 B=2 C=4 D=2 E=4 F=2 G=4 H=3 I=4
-
Group 2: A=4 B=2 C=4 D=2 E=1 F=3 G=2 H=1 I=5
-
Group 3: A=4 B=5 C=5 D=3 E=5 F=2 G=1 H=4 I=1
-
Group 4: A=3 B=5 C=3 D=3 E=1 F=2 G=2 H=1 I=1
-
Overview HW4 and introduce code base.
-
Play Mancala and discuss strategy.
-
Before Class 8 ():
-
Assigned readings
-
Watch the following FYS 187-4 videos on heuristic evaluation of game-tree nodes:
-
Class 8 ():
-
Heuristic feature discussion: Connect 4
-
In groups: Mancala play and heuristics brainstorming
-
Download Ludii game system (platform independent Java .jar file) or get Ludii-1.3.1.jar locally.
-
Start the game program with command "java -jar Ludii-1.3.1.jar" (or whichever more recent version exists), then File → Load Game (or Ctrl-L) → Games → board → sow → two rows → FairKalah.
-
Play games and discuss possible features as you play.
-
Before class 9 ():
-
Class 9 ():
-
In-class discussion of assigned reading and guided Mancala project work in assigned pairs.
-
Before class 10 ():
-
Class 10 ():
-
Worked expectimax examples
-
Discussion of utility, and the importance of utility definition.
-
"The difference between utopic and dystopic visions of AI in sci-fi is in the definition of the utility function."
-
"To exclude non-quantitative values from utility functions is to assign them a utility of 0."
-
Parameterized Poker Squares play with Poker Squares play sheets
-
Before class 11 ():
-
Class 11 ():
- Parameterized Poker Squares abstraction
- Use of abstraction: abstract problem, solve abstracted problem, apply abstract solution to original problem
-
Expectimax variants:
- Depth-limited
- Iterative-deepening
- Chance sampling
-
Connect Four play demonstration - install Eclipse project cs371-bandit-connect4.zip
-
Run Connect4.java with settings: 6 Rows, 7 Columns, Black AI Player (unchecked), Red AI Player (checked), UCT Player (unchecked, then checked for next game later in class), then Play
-
n-Armed Bandit demonstration activity - Run NArmedBanditGame.java:
-
Set random seed (y/n)? y
-
Seed? 1234
-
(1) Normal mean distribution, (2) Logorithmic mean distribution, or (3) Given mean distribution? 1
-
Number of arms? 10
-
Total number of pulls? 100
-
Overview of exploration/exploitation dilemma, n-armed bandit problem, action selection algorithms, and Monte Carlo Tree Search
-
Before class 12 ():
-
Class 12 ():
-
Partial presentation on the analysis of the dice game Pig (slides)
-
Summarization of dynamic programming (DP) pattern using project example code examples.
-
Overview of HW5 DP exercise.
-
Before class 13 ():
-
Class 13 ():
-
Before class 14 ():
-
Class 14 ():
-
Complete Chutes and Ladders Solver.
-
Download and complete class exercise HogSolverInClass.java
-
Midterm exam expectations overview
-
Before class 15 ():
-
Study for midterm exam to be given in class 15.
-
Class 15 ():
-
Moodle midterm in class
-
Midterm programming questions due before class 17.
-
Before class 16 ():
-
Assigned readings
- Start midterm programming exercises and bring any questions about them that you have to class.
-
Class 16 ():
- Review of Bellman's Optimality Equations for Markov Decision Processes (MDPs)
- V(s) and Q(s,a) backup diagrams
- Q-Learning algorithm
- Start of Q-Learning implementation for Pig Solitaire
-
Before class 17 ():
-
Class 17 ():
- Continue Q-Learning implementation for Pig Solitaire
-
Before class 18 ():
-
Class 18 ():
-
Before class 19 ():
-
Class 19 ():
- Peer assessment of previous class Jupyter notebook exercises and current class Jupyter notebook "before class" activities.
- In-class portions of class Jupyter notebooks
-
Before class 20 ():
-
Class 20 ():
- Peer assessment of previous class Jupyter notebook exercises and current class Jupyter notebook "before class" activities.
- In-class portions of class Jupyter notebooks
- (Same class 20 rhythm until at least class 24 ().)
-
Before class 25 ():
-
Class 25 ():
-
Brief description of Propositional Logic representation and reasoning.
-
Probabilistic Reasoning: Gibbs Sampling for Bayesian Network Reasoning
-
Gibbs sampling
project work
-
Before class 26 ():
- Make sure you're caught up on readings.
-
Class 26 ():
-
In-class applications of Gibbs sampling to demonstrate Bayesian network patterns of reasoning.
-
Presentation on AI and Ethics