Assignments and examples for the course in CS 5/7320 Artificial Intelligence taught at the Computer Science Department at SMU by Michael Hahsler. Slides and more information for students taking the course can be found on SMU's Canvas.
The code examples follow the textbook Artificial Intelligence: A Modern Approach by Russell and Norvig. The code in this repository is intended to be simple to focus more on the basic AI concepts and less on the use of advanced implementation techniques (e.g., object-oriented design). More complex code examples accompanying the textbook can be found at the GitHub repository aimacode.
Chapter | Slides | Code |
---|---|---|
1: Introduction to AI | Slides | No Code |
2: Intelligent Agents | Slides | Code |
3: Solving Problems by Search | Slides | Code |
4a: Search in Complex Environments: Local Search | Slides | Code |
4b: Search in Complex Environments: Search with Uncertainty | Slides | Nondeterministic Actions in Games |
5: Adversarial Search and Games | Slides | Code |
6: Constraint Satisfaction Problem | Slides | Code |
7-9: Logical Agents | Slides | No Code |
12: Uncertainty | Slides | Code |
13: Probabilistic Reasoning | Slides | Code |
19: Learning from Examples (Machine Learning) | Slides | Code |
You can experiment with the code online without installation using Binder.
To work on assignments, you need to install Python and Jupyter Notebook on your system. You can
-
[preferred solution] Install Docker and execute
docker run -p 8888:8888 -e JUPYTER_ENABLE_LAB=yes jupyter/datascience-notebook
to download and create a container that runs Jupyter Lab and bookmark the link, including the login token that you get. Details and configuration options can be found on the Jupyter Docker stack GitHub page) From now on, usedocker ps -a
to list containers and their container id,docker stop <container id>
anddocker start <container id>
to stop and start the container (do not userun
again because it will create a new empty container). For git, use thehttps
protocol and notssh
. -
Install Python, Jupyter Notebook, and the needed packages (e.g., via Anaconda).
If you are not familiar with Python, then you should work through one of the many Python tutorials (e.g., this tutorial) to learn the basics about Python and the packages numpy
and pandas
. Other good sources to learn Python are
the notebooks intro to Python
and intro to numpy and pandas
by Eric Larson. Some code examples that help with the assignments are available here.
How to use Jupyter notebooks is covered in many online tutorials like the Jupyer notebook tutorial.
You can fork this repository to work on your solutions with version control. The notebook needs to be a complete project report with documentation (including your design choices), code and the results (e.g., tables with simulation results) with a short discussion of what they mean. Use the provided notebook cells and insert additional code and markdown cells as needed.
To submit your finished assignment for CS 5/7302, the compiled notebook into a pdf (either export the notebook as pdf or print to pdf). Do not submit the raw notebook or an html file since Canvas does not support instructor annotations for these file types.
All code and documents in this repository are provided under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License.