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.
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)
- Aug 28: Homework week 1: getting started with python.
- Sep 4: Homework week 2: Boggle part 0, Labor day holiday Sep 4.
- Sep 11: Homework week 3: Boggle part 1
- Sep 18: Homework week 4: Boggle part 2
- Chapter 3.1 uninformed search slides.
- Friday: bring your boggle program to class to compete for EXTRA CREDIT: fastest program that gets the right answer wins! (no false positive words, no false negative words)
- Sep 25: Homework week 5: Route-finding part 0.
- Oct 2: Homework week 6: Route-finding part 1.
- Oct 9: Homework week 7: Route-finding part 2.
- EXTRA CREDIT 13 Oct 2023: bring your search program to class to compete, fastest program that gets the right answer wins! Make sure your program can be called on the command line via for example: python your_solution.py inFile.txt BEST U T
- Oct 16: week 8, no homework.
- no class Mon Oct 16.
- Mid-term review Weds 18 Oct. The exam will consist of a route-finding problem that you will have to work through by hand. You will be given a picture similar to the slide which shows the map of Romania, and you will have to work through the iterations of the tree search algorithms, step by step. You may want to review the sample output from week 6, to make sure you understand why the algorithm does what it does at each iteration.
- exam Fri 20 Oct in class.
- Oct 23: Homework week 9: Halma part 0.
- thinking about study habits
- 1. What grade do I want in this class? Am I on track to earning that grade?
- 2. at least one example of a good study habit that I have been practicing during the first half of the semester, which is helping me earn the grade I want, and which I would like to continue.
- 3. at least one example of a change in study habits that I could do in the second half of the semester, in order to earn the grade I want. asking questions in class, asking questions with classmates, asking questions during office hours, organizing group study sessions, …
- Oct 30: Homework week 10: Halma part 1.
- Nov 6: Homework week 11: Halma part 2.
- Veterans day holiday Nov 10.
- Only office hours this week Tues 3-4.
- Nov 13: Homework week 12: Image classification part 0: installation
and visualizing images.
- Monday Nov 13: Halma competition!
- installation instructions.
- intro to machine learning slides.
- Mon: extra credit Halma tournament! Bring a laptop with your code to class to compete for extra credit points.
- Nov 20: Homework week 13: Image classification part 1. Thanksgiving holiday Nov 23-24.
- Nov 27: Homework week 14: Image classification part 2.
- Dec 4: reading week, exam review, Weds Dec 7. present your solution for 10 extra credit points toward your exam score.
- Finals week, exam Weds Dec 13, 8-9:30.
- It will be open-note: during the real exam, you are allowed one sheet of paper (front and back), filled in with your own notes, in your own handwriting.
Homeworks will be graded using this General Usage Rubric.
The optional readings will be from Artificial Intelligence: A Modern Approach by Russell and Norvig.
- Dead tree book at Cline (on 4 hour reserve).
- Amazon
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.