This course will teach you to design, write, and analyze code to solve computational problems loosely considered to be in the area of Artificial Intelligence.
REQUIRED textbook. The required text for the course is the third edition of Artificial Intelligence: A Modern Approach by Russell and Norvig. You really really do need it. It’s expensive, but in this case, the expense is worthwhile. We’ll cover chapters 1-9, 13-15, 18, and 20.
In order to take this course, you must have experience equivalent to CS 10. You will design and write a lot of code in this course, with only high-level guidance.
The course will meet during the 10a period: 10:10 am to 12:00 pm, Tu/Th, in Kemeny 008. All documents, class examples, lab assignments, short assignments, and sample solutions related to the course will be on this web page. There is also a Canvas site, which you will use to submit assignments. We have several TAs for the course, who will hold weekly office hours, which will be posted on Canvas on a google sheet. My office hours will be posted in the same place. My office is ECSC 109. Although you are welcome to email me, in most cases it’s better to find me in person at office hours so we can have a meaningful 2-way discussion.
Assignment due dates will be posted on Canvas, and should be submitted through Canvas.
Uninformed search slides. Overview. Agents. Modeling. Uninformed Search: BFS. Uninformed Search: DFS (path-checking and memoizing). Foxes and Chickens assignment out. Read chapters 1 & 2.
Mon Jan 7. Uninformed search slides part 2 Bidirectional search. IDS. Uniform-cost search. Comparing search strategies. Read 3.1-3.6 and 4.1 - 4.2.
Informed search slides. Greedy search. Where do heuristics come from? Read 4.3, 4.4.
Non-deterministic actions; partial observations. Read 5.1 - 5.3. Mazeworld assignment out.
Adversarial search slides. Adversarial search; expectiminimax. alpha-beta pruning. Read 5.4, 5.5, 5.7.
Non-zero sum games. Extra: Solution to polynomial-time blind robot problem. Chess out.
CSP slides. Constraint satisfaction. Arc consistency. Backtracking search. Read R & N: 6.1 - 6.6.
CSP continued. CSP dual problems. Read the wikipedia article on CSP dual problems. Random walks. CSP assignment out.
First order logic slides. Models, relations, functions, and lifting. Read R & N: 9.1-9.6. Sudoku assignment out (Sudoku)
First-order logic continued: Peano axioms.
Probability. Probability slides. Read 14.1 - 14.4.
Bayesian networks. Markov models. Probabilistic reasoning over time. Read R & N: 13.1-13.5, 15.1, 15.2, 15.3.
Filtering, smoothing, forwards-backwards, Viterbi. Markov models with matrices. Read R & N: 15.4. HMM assignment out.
Bonus: Stationary distributions. Pagerank. Read Kamvar et al.
Robotics slides. Visibility graphs. Configuration spaces. Cell decomposition. Roadmaps. Voronoi diagrams.
We will have an assignment peer review process. This will allow you to see code and solutions written by other students, get practice in evaluating solutions, and practice writing up your work for an informed audience. Submit your reviews on Canvas; you will be assigned one solution to review each week.
For this process to work, you must:
Your TAs and I will grade your work; the reviews are solely for your benefit.
Peer review is a critical part of the scientific process. It is a real challenge to write a good review; the work was done by someone else, and it might not follow the approach you would have taken. For that reason, writing reviews well demonstrates real mastery.
A good review will be written in a clear, succinct fashion, and should take a balanced approach that explicitly points out strengths of the work as well as weaknesses. The review should specifically address the merits of both the technical work, and the presentation of that work.
Here is a brief template for a review. A short paragraph or two for each discussion section is sufficient.
On a scale of 1-5, with 5 being excellent, how would you rate this work in each of the following areas?
Discuss strengths and weaknesses with regard to technical soundness in the report. Discuss the results of running the code. Are they complete? Did the code run reliably? Was it easy to figure out how to run the code?
Discuss strengths and weaknesses with regard to technical depth. Does the work go beyond the basic assignment? How? Are there particular insights about algorithms that indicate a particularly deep understanding of the problem?
Discuss strengths and weaknesses with regard to presentation. Is the report structured well? Does it provide clear explanations of figures and experimental data? Are there grammatical issues that could be easily fixed?
Ed discussion is our main forum for asking and answering questions. You should access Ed discussion using the Canvas site for this course. Consistently excellent answers to ed discussion questions will be rewarded in the grading at the end of the term.
See the Canvas page.
Almost all of your grade will be determined by performance on assignments. Assignments will be scored on a 25-point scale, but the score for technically excellent work will be 20 points, roughly equivalent to a B. A score of 23 points would be a solid A.
In order to achieve a score of higher than 20 points, you will have to go beyond the suggested minimum for the assignments. I might suggest a few challenge questions or ways to extend the assignment, or you may simply extend the assignment in a way that you find interesting. Style and design of your code, and quality of your written document will also be significant factors in assignment grades. The quality of the peer-reviews you write will be considered informally. If your reviews are excellent, useful, and consistent, then I may increase your final grade. If they are incomplete, late, or unhelpful, I will certainly decrease your final grade.
The grading policy reflects a philosophy: one of the main things to learn from this course is how to increase the impact of your work. Is your work creative and novel? Is it presented well, so that other people enjoy hearing about it and use it? Anyone (including our friend ChatGPT) can code up an algorithm, given some pseudocode and a reasonable explanation – thus, a simple implementation of the basic algorithm is not worth a score of 100%, A+, outstanding, etc. Creativity and engagement with the assignment are necessary to reach a better score, just as they would be in a writing assignment.
Late assignments will receive no credit. This policy is necessary because late assignments interfere with our ability to post solutions, and hurts those in the class who completed the assignment on time. Sometimes something truly tragic happens. Therefore, I will allow you to submit one assignment up to one week late during the term, without asking me. We will take a quick look at your one late assignment; if it looks satisfactory and complete at first glance, we will give it a score of 20, but no written feedback.
All assignments will be done in Python 3. Some of the assignments will use the same graphics library used by cs1. Even if you’ve taken cs1, you should re-install the library, etc, since versions may have changed. You should install all of the following:
If you aren’t familiar with using the terminal to move files around on the mac, I’d recommend reading this article from macworld.
If you have a working copy of python3 and cs1lib.py from CS 1, then you are all set. If not, here are the instructions you need from the CS 1 web page:
[Installation instructions for Mac] (https://cs.dartmouth.edu/kvasanta/cs1/install-mac/index.html)
[Installation instructions for Windows] (https://cs.dartmouth.edu/kvasanta/cs1/install-windows/index.html)
You may discuss homework with other students at a high level, but should never look at or copy another student’s written work. You should never under any circumstances turn in homework that is a duplication or partial duplication of another student’s solution. You must also credit other students you have talked with, or any other sources.
How does the Honor Principle apply to Ed Discussion use? If you have a question that you think will reveal part of the solution to an assignment, ask it privately, and course staff will answer it. Otherwise, please ask the question publicly. If you answer a question, please do so without using code in your answer, unless the question is a simple direct question about syntax.
Some students may wish to take part in religious observances that occur during this academic term. If you have a religious observance that conflicts with your participation in the course, please meet with me before the end of the second week of the term to discuss appropriate accommodations.
I encourage students with disabilities, including “invisible” disabilities such as chronic diseases and learning disabilities, to discuss with me after class or during my office hours appropriate accommodations that might be helpful to you.
Students with disabilities enrolled in this course and who may need disability-related classroom accommodations are encouraged to make an appointment to see me before the end of the second week of the term. All discussions will remain confidential, although the Student Accessibility Services office may be consulted to discuss appropriate implementation of any accommodation requested.
Students requesting disability-related accommodations and services for this course are required to register with Student Accessibility Services (Getting Started with SAS webpage; student.accessibility.services@dartmouth.edu; 1-603-646-9900) and to request that an accommodation email be sent to me in advance of the need for an accommodation. Then, students should schedule a follow-up meeting with me to determine relevant details such as what role SAS or its Testing Center may play in accommodation implementation. This process works best for everyone when completed as early in the quarter as possible. If students have questions about whether they are eligible for accommodations or have concerns about the implementation of their accommodations, they should contact the SAS office. All inquiries and discussions will remain confidential.
The academic environment at Dartmouth is challenging, our terms are intensive, and classes are not the only demanding part of your life. There are a number of resources available to you on campus to support your wellness, including your undergraduate dean, Counseling and Human Development, and the Student Wellness Center. I encourage you to use these resources to take care of yourself throughout the term, and to come speak to me if you experience any difficulties.
At Dartmouth, we value integrity, responsibility, and respect for the rights and interests of others, all central to our Principles of Community. We are dedicated to establishing and maintaining a safe and inclusive campus where all have equal access to the educational and employment opportunities Dartmouth offers. We strive to promote an environment of sexual respect, safety, and well-being. In its policies and standards, Dartmouth demonstrates unequivocally that sexual assault, gender-based harassment, domestic violence, dating violence, and stalking are not tolerated in our community.
The Sexual Respect Website at Dartmouth provides a wealth of information on your rights with regard to sexual respect and resources that are available to all in our community.
Please note that, as a faculty member, I am obligated to share disclosures regarding conduct under Title IX with Dartmouth’s Title IX Coordinator. Confidential resources are also available, and include licensed medical or counseling professionals (e.g., a licensed psychologist), staff members of organizations recognized as rape crisis centers under state law (such as WISE), and ordained clergy. Please see this for more information.
Should you have any questions, please feel free to contact Dartmouth’s Title IX Coordinator or the Deputy Title IX Coordinator for the Guarini School. Their contact information can be found on the sexual respect website at: https://sexual-respect.dartmouth.edu.
I do not expect to record class lectures. Fortunately, except for the robotics lectures, almost all of the material you need is in the textbook; if you must miss a lecture, read the material, and ask questions on ed discussion about points of confusion.
(The same as for CS 1.)
Read the material I ask you to read. Start all assignments early. With few exceptions, at the time you receive an assignment, you will know everything you need to do it.
Do not be afraid to get help. The purpose of this course is not to waste your time. If you are not making progress on a problem, please see at TA or myself.
Three final pieces of advice:
The material builds on itself, and the pace is fast. As a result, it is easy to fall behind in this course, and if you do it is very difficult to recover.