AI setup

Finished what i think will work as an AI, there was no testing, just
what i thought about on paper... please make changes or fixes or
something, thanks