Skip to content

Examples for an AI course following the textbook Artificial Intelligence: A Modern Approach by Russell and Norvig.

License

Notifications You must be signed in to change notification settings

smu-cs-3353/CS7320-AI

 
 

Repository files navigation

Artificial Intelligence - Simple Python Code Examples and Assignments

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 (AIMA) 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.

Covered AIMA Chapters

Chapter Slides Code
1: Introduction to AI Slides -
2: Intelligent Agents Slides Code
3: Solving Problems by Search Slides Code
4.1-2: Search in Complex Environments: Local Search Slides Code
4.3-5: Search in Complex Environments: Search with Uncertainty Slides Code
5: Adversarial Search and Games Slides Code
6: Constraint Satisfaction Problem Slides Code
7-9: Logical Agents Slides -
12: Quantifying Uncertainty Slides Code
13: Probabilistic Reasoning Slides Code
16: Making Simple Decision Slides -
17: Making Complex Decision - Code
19: Learning from Examples (Machine Learning) Slides Code

Installing Python and Jupyter Notebook

You can experiment with the code online without installation using Google CoLab.

To work on assignments, you can use one of several environments:

  • Use the online service Google CoLab. No additional installations are necessary.
  • Install Docker and use a prepared JupyterLab on Ubuntu image. Execute docker run -p 8888:8888 -e JUPYTER_ENABLE_LAB=yes jupyter/datascience-notebook to download and create a container that runs JupyterLab and bookmark the link (including the login token) that you get during installation. Details and configuration options can be found on the Jupyter Docker stack GitHub page) From now on, use docker ps -a to list containers and their container id, docker stop <container id> and docker start <container id> to stop and start the container (do not use run again because it will create a new empty container).
  • Install Python, JupyterLab and all needed packages yourself. You can also use Visual Studio Code as a nice editor.

Learning Python and Jupyer Notebook

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. 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.

Working on Assignments

You can either download individual assignment notebooks or clone the complete repository using

git clone https://github.com/mhahsler/CS7320-AI

The assignments are improved frequently, so always pull the latest version before you start to work on a new assignment.

git pull

Your assignment notebooks needs to be a complete project reports with

  • documentation (including your design choices),
  • code (with comments for difficult to understand sections) and
  • 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.

License

All code and documents in this repository are provided under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License.

CC BY-SA 4.0

About

Examples for an AI course following the textbook Artificial Intelligence: A Modern Approach by Russell and Norvig.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 82.8%
  • HTML 17.1%
  • Python 0.1%