Comments and AI

Implemented a sweet AI frame work and comment about a third of our
uncommented code.