abstracted #run_ai_game