Code from my graduate AI class, posted with permission of the Professor