added AI

AI is working but it is pretty stupid, though the simulation has been set to 3000. I'm still trying to figure out the reason