Added basic but functional AI.