How do you handle non-trivial artificial intelligence in your homebrews?
I just re-implemented a new AI for the Smashbros-like that entered the nesdev compo 2016. Since I love to solve problems by myself, I came with my own solution. At any time, the bot has a current action, which is a simple technical move, like "double jump". When the current action is complete, a new one is selected by running a series of subroutines, each trying to solve a specific task, for example a subroutine can try to hit the opponent, another can try to move to a safe area, ... It leads to an easy to write AI, each subroutine focusing on a specific goal. As a bonus, the bot's behavior can be adapted at run time by modifying the list of subroutines used during the selection phase.
Being pretty proud of the thought process and the result, I also wrote an article about the subject. And now that everything is clear in my head, I would be glad to compare with how you guys fix the same problem.
I just re-implemented a new AI for the Smashbros-like that entered the nesdev compo 2016. Since I love to solve problems by myself, I came with my own solution. At any time, the bot has a current action, which is a simple technical move, like "double jump". When the current action is complete, a new one is selected by running a series of subroutines, each trying to solve a specific task, for example a subroutine can try to hit the opponent, another can try to move to a safe area, ... It leads to an easy to write AI, each subroutine focusing on a specific goal. As a bonus, the bot's behavior can be adapted at run time by modifying the list of subroutines used during the selection phase.
Being pretty proud of the thought process and the result, I also wrote an article about the subject. And now that everything is clear in my head, I would be glad to compare with how you guys fix the same problem.