Further developed AI. Fixed player.