Implemented a pretty simple AI.