Second Homework assignment for Artificial Intelligence Class