Simple AI implemented

need to be tested; possibly using more complex algorithm.