AI now searches the squares and makes the first legal move. Super stupid but it works.