Basic AI implementation

Fix for #68