Updated AI

Updated the AI to be less likely to keep going into the wall by making
it random anew if it collides with a wall.