Added a working but quite naieve AI