Assignment 3 for AI course.