Computer Science 470 at Northern Arizona University, Fall 2023

Topic: Artificial Intelligence.

Dates: Aug 28 to Dec 15.

Meeting time/place: MoWeFr 9:10AM - 10:00AM, SBS Castro 102.

Course materials adapted from Dr. D’s Spring 2018 offering and my previous offering.

Syllabus: Google Doc.

Weekly schedule of homeworks

Each homework must be submitted on bblearn as a single PDF report, with all of the code, results, and answers to questions.

Please make sure that your report contains the commands and output as shown in this example output file. For each test command

  • There should be a >>> prompt followed by the test command,
  • followed by the output of that command (from print statements and/or the return value),
  • followed by a newline (to provide visual separation between each command). If you do sys.ps1=’\n>>> ’ then that will print a newline before every command prompt.

One way to do this is by simply running “python” which starts the interactive REPL, and then paste your code in (make sure your code does not have any empty lines in the middle of function/class definitions, and that you do have an empty line at the end of each function/class definition). Also in emacs you can just go to the top of your script file, then keep doing C-RET to execute each line of code, until you have done your whole script. A more automated way to do this (less tedious copy-pasting) is by running your python script through interpreter.py, for example:

$ python interpreter.py example_homework_code.py 


>>> def add(x, y):
...     result = x + y
...     return result
... 

>>> # if you want to use interpreter.py, then only put empty line at the

>>> # end of function/class definitions, as above (not inside of

>>> # function/class definitions).

>>> add(1, 2)
3

>>> add(3, 10)
13

Each homework assignment is due on the Friday of the corresponding week, at 11:59PM. Homeworks will require use of python and emacs, see my installation guide here in which you can see the code, send lines interactively to the python interpreter with a keystroke (control-enter in emacs), and immediately see the results/output after running each line of code. (if you want to use another editor, you must come to office hours and show me that you can do interactive code execution)

Homeworks will be graded using this General Usage Rubric.

Video Resources

Textbook

The optional readings will be from Artificial Intelligence: A Modern Approach by Russell and Norvig.

Exercises

AIMA Exercises

Software

pytorch

Tutorial explaining pytorch installation under anaconda.

The command I used to install was:

conda install pytorch torchvision cpuonly -c pytorch

After that you should be able to do import torch in python.