Finalized AI

As it stands, the base of the AI is implemented. I tested the logic out
by hand and the AI is performing as designed. The branch should now be
ready for a merge.