1

Has anyone ever attempted to decompile the code for a Pokemon game and figure out how the battle AI works? e.g. How it decides which move to use, or use a Potion/even withdraw based on the current state of the game. I'm very interested in how it works because I would like to build my own battle AI as part of a research project.

  • Probably they push random buttons like you do 😀 – mrexodia Sep 2 '18 at 9:24
1

There is a project to disassemble the Pokemon games at https://github.com/pret. As a reference in Pokemon red, You can find the file that defines the trainer AI here https://github.com/pret/pokered/blob/master/engine/battle/trainer_ai.asm

Unfortunately this is all in assembly and I don't believe there is a translation to C at this stage.

  • Are there efforts underway to disassemble more recent Pokemon games, like XYORAS or Sun/Moon? I know that with earlier generations there are some flaws in the AI, for example this video describes a fascinating Gen I glitch: youtube.com/watch?v=CClsivwN8aw – James Ko Sep 2 '18 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.