Implemented basic AI