CS 2710 / ISSP 2610 - Foundations of Artificial Intelligence

Welcome to the TA website for CS2710/ISSP2610 - Foundations of Artificial Intelligence.

This website is mainly intended for homework assignments.
The course website is http://people.cs.pitt.edu/~wiebe/courses/CS2710/Fall2015/


Course Files

Here are all the files from Dr. Wiebe's course.
Course files
You can find the material covered by Dr. Hauskrecht at the following link:
Additionally, solutions to some of the homework assignment have been uploaded to CourseWeb.
The solution for assingmnent 5 will be posted after its submission deadline.
Good luck!


Assignment 5: Uncertainty
The deadline for Assignment 5 is December 10th, at 5pm. No late submissions will be accepted.
You can submit the assignment by uploading it to /afs/cs.pitt.edu/public/incoming/CS2710/assignment5/ or print it and hand it in at class time on December 10.
If you have problems with AFS you can email it directly to me.

Assignment 4
The deadline for Assignment 4 is November 24, at 11:59pm.
Downlooad code

Assignment 2
The deadline for this assignment is October 13 at 11:59pm. Please write your name on the report.
Download source code
Tutorial for the source code
When writing the report you can use PlayerAlpha and PlayerBeta to gather statistics. (Here are the players for Python 3.5)
Your can play a game with the following command:

     python3 driver.py < your_checker_code > PlayerAlpha34

  • make sure to use your_checker_code without .py
  • PlayerAlpha and PlayerBeta are precompiled python .pyc files. The two numbers in the file name indicate the python version: make sure this matches the python version you are using or it won't work.
  • There is a third player file, PlayerCharlie. You can use it for testing but you don't need to report the results for this player.

UPDATE 10/09: if you are using Windows and the Python 3 version of driver.py does not work because of os.name() you can change os.name() to platform.name(), and of course import the platform module.

The largest part of your grade for this assignment comes from the interestingness of your heuristic and cutoff functions. If you are using a combination of multiple functions for your heuristic, I would suggest using at least 3 to 4 different functions.
Here are some articles you might find useful:
  - Samuel, Arthur L. "Some studies in machine learning using the game of checkers. II-Recent progress." IBM Journal of research and development 11, no. 6 (1967): 601-617.
  - Schaeffer, Jonathan, Joseph Culberson, Norman Treloar, Brent Knight, Paul Lu, and Duane Szafron. "A world championship caliber checkers program." Artificial Intelligence 53, no. 2 (1992): 273-289.

  • After all the submissions have been received we will run a tournament among your AIs.
  • Only submissions written in Python 3 will be entered in the tournament.

Assignment 1
The deadline for Assignment 1 is September 24, at 11:59pm.
Download the source code (searchP2.py or searchP3.py according to the Python version you plan to use) from Dr. Wiebe's website.
Specifications for functions to implement/modify:

  • Each state is represented as a tuple of tuples, e.g. ((1,2,3), (8,0,4), (7,6,5)) is the goal state.
  • Functions for the 8-puzzle implementation:
    • goalp(node): returns true if node.state is the goal state, false otherwise.
    • successor(node): returns a list containing all the successors states after a single move from node.state.
    • edgecost(state1,state2): returns the cost for moving from state1 to state2.
  • Heuristic functions:
    • hMisplaced(node): returns number of tiles out of place for the current state. NOTE: you should not count the blank (0) as a tile out of place.
    • hManhattan(node): returns the Manhattan heuristic for the current state.
    • hPatternDatabase(node) hPatternDB(node): returns the heuristic evaluation of the current state based on a precomputed pattern database.

How to run your script:
  • Your script should be able to run by executing in a terminal the command:
    python your_script search_algorithm init_state core_algorithm
    E.g. python example.py depthfirst "((1,2,3),(8,0,4),(7,6,5))" treesearch
    • You can use the function ast.literal_eval(x) in order to convert a string x into a tuple, for easily managing the input of the initial state in the above command.
    • You may need to use the command python3 or python3.4 instead of python, if you plan to use Python version 3.

  • In this package you can find sample grading script for your Assignment 1. It is important that your program can be called by the grading script and that it passes all the tests, although the actual grading will involve more extensive testing. The grading script will check the correctness of the functions for playing the 8-puzzle (goalp, successor, and edgecost) as well as the three heuristic functions (hMisplaced, hManhattan, and hPatternDatabase). For each of these functions the grading script will display "GO" if a function passed the test or "NO GO" if a function is incorrect.
  • In order to use these scripts, you should run one of the following two commands:
    python testP2.py yourScript
    python3 testP3.py yourScript
    depending on whether you are using Python 2 or Python 3. Please omit the .py from the name of your script.

Assignment submission

TA Contact: Luca Lugini