CMPSCI 383: Artificial Intelligence

Fall 2014 (archived)

The End

“By far the greatest danger of Artificial Intelligence is that people conclude too early that they understand it.” ― Eliezer Yudkowsky

We’ve reached the end of the semester.

This semester, I tried to give you a guided tour of topics in Artificial Intelligence. I hope that the material we covered has weighted your (biological) neural networks appropriately, and helps you in the future when the need or interest arises.

Please get in touch if you’re around in the future. I’d love to hear what you’re up to.

Cheers,
Marc

Final Exam Graded

The Final Exam has been graded, and the grades are up on Moodle. The mean was 70, the median 74. The approximate distribution was as follows:

(90,100]: 2  
(80,90]: 10
(70,80]: 13
(60,70]:  8
(50,60]:  4
(0,50]:   5

Assignment 10 Graded

The Assignment 10 submissions have been graded. I have posted grades on Moodle.

The test cases referenced in the autograder’s output for are available for download here: assignment10-test-cases.tar.gz

A sample solution in Java is available here: HMMInference.tar.gz. The implementation of the filtering algorithm is straightforward and two-part as described in class. The implementation of the Viterbi algorithm is an ugly port of my first draft in Python to Java. I wish I had time to make it beautiful for you all, but like you, I am pressed for time at the end of the semester.

As usual, if you think something in the grading was incorrect (and not in your favor), please email or come to see me.

Exam 3 Graded

Exam 3 has been graded, and the grades are up on Moodle. The mean was 74. The approximate distribution was as follows:

(90,100]: 8  
(80,90]: 10
(70,80]:  9
(60,70]:  5
(50,60]:  6
(0,50]:   4

I will have regular office hours Monday; I will email and post on the blog if there is a location change, and if I plan a separate review session.

Assignment 09 Sample Solution and Test Cases

The test cases referenced in the autograder’s output for Assignment 09 are available for download here: assignment09-test-cases.tar.gz

A sample solution in Java is available here: KMeans.tar.gz. It implements the algorithm for k-means clustering with the constraints given in the assignment. When computing Euclidean distance between points, it computes the sum of the squares of the dimension-wise differences, but doesn’t take the square root of that sum. This is fine, since the square root is a monotonically increasing function of its input.

Some notes on the grading from Patrick:

Some people misunderstood the algorithm.

  • For example, one person updated each cluster center by assigning it the value of the data point closest to the mean of the cluster rather than the mean itself.
  • Another person did something with random numbers that I didn’t understand.
  • Another did not iterate, outputting the first cluster assignment.

I also noticed a pair of mistakes crop up more than once.

  • One mistake was not handling greater than 1 dimension correctly (by ignoring the additional values, or doing something else that was unclear to me). In this case, the two 1d tests passed, but the other tests had errors.
  • One more subtle mistake was using Manhattan distance (the sum of the absolute value of the dimension-wise differences) rather than the Euclidean distance as specified. This error resulted in only a small number of mis-labelings in the 2d case, but many in the 10d case.

As usual, if you think something in the grading was incorrect (and not in your favor), please email or come to see Patrick or me.

Assignment 08 Sample Solution and Test Cases

The test cases referenced in the autograder’s output for Assignment 08 are available for download here: assignment08-test-cases.tar.gz

A sample solution in Java is available here: DecisionTree.tar.gz. It mostly follows the algorithm in Russell and Norvig. It omits the first termination condition (“if examples is empty”) since that case will not arise in a tree composed of only boolean attributes (though it didn’t hurt to leave it in). You can run the program with only training data specified on the command line to see a crude printout of the tree it learns.

Some notes on the grading:

  • Unlike the naive Bayes classifier, there is ambiguity in the tree your program could correctly learn. If there is a tie in information gain, it’s unspecified which attribute the program should select to split on.
    • The small test cases are all intended to be unambiguous in terms of output, so your program’s output was evaluated strictly. That is, they had to match the expected output exactly. If you believe I am mistaken here, please send me an email outlining your reasoning. If I’m wrong I’ll be more than happy to give you (and everyone else) their points back.
    • The large test cases are somewhat ambiguous, depending upon the exact tree your program constructed, so I evaluated liberally. This means that I checked that the labels were right (I did not examine the probabilities), and that I allowed for a small fraction of misclassification relative to my sample implementation (up to 15% different and you still received full credit).
  • A common mistake was to stop splitting early when all attributes had an information gain of zero. Some functions require splitting on several attributes. The XOR small test caught this error.

As usual, if you think something in the grading was incorrect (and not in your favor), please email or come to see Patrick or me.

Exam 3 Review Session

CHANGE OF LOCATION: The session will be held in CS203, not CS343 as originally announced.

At 1200 on Wednesday 03 December in room 343 203 of the Computer Science building, I will hold a question-and-answer-style review session for Exam 3. This room is not my office – it’s a conference room down the hall.

It may be helpful to look over the review sheet before this session.

Assignment 09 Graded

The Assignment 09 submissions have been graded. Patrick has posted grades on Moodle.

As is the case for the previous assignment, a couple of extensions are still in effect, so for reasons of fairness I have not yet posted the test cases and the sample solution. I will post them as soon as all deadlines are expired. I’ll have more to say about the grading then.

Assignment 08 Graded

The Assignment 08 submissions have been graded. Patrick has posted grades on Moodle.

A couple of extensions are still in effect, so for reasons of fairness I have not yet posted the test cases and the sample solution. I will post them as soon as all deadlines are expired. I’ll have more to say about the grading then.