Adding Basic AI functionallity

Untested at this point. Do not use.