Put ai_move on a timed event to prevent delayed piece snapping