Artificial Intelligence Homework 2 Solution