Program 2 for Weiss' Artificial Intelligence course (Spring '14)