OpenAI interview question

simulate a monster battle problem