#Creating Pokemon battle AI that can beat best players

4 messages · Page 1 of 1 (latest)

ornate wren
#

Hi, I am trying to create Pokemon battle AI, that has about 50% of beating best human players. I haven't worked with AI really before, so I hope people could direct me to right direction.

Rules:

  • Both sides see every Pokemon, their stats as well and know every move that the opponent has
  • Gen 4 mechanics with simplification. No abilities. All weather and pseudoweather moves are permanent. A lot of mechanics could be simplified or removed for AI.

Goals:

  • I want to be able to explain "the thought" process that lead AI to the choice. I have an assumption that learning algorithms will not have that, so I am steering away from those out of the ignorance that I have.
  • AI can sometimes guess, that you are switching so it will try to switch as well
  • I am willing to negotiate a little bit with probability calculations

Some thoughts:

  • I have feeling that Pokemon could be solved. So I am not satisfied with basic alpha-beta prunings or learning algorithms.
  • Calculating 1v1 is trivially easy. That's why I think calculating in 6v6 36 separate 1v1's holds value.
  • I think categorizing advantage as temporary and permanent holds value. Switching gives temporary advantage, but as soon as enemy mirror your switch the temporary advantage is pretty much lost. Doing actual damage gives permanent advantage.

Willing to write max. 10000 lines of code for now

distant adder
#

Sounds really interesting. Do you know the state space? That is, the number of different "positions" (not sure of correct word for this game) that can exist in the game? Also, how many total turns are in a game?

ornate wren
#

Normally the game is 3v3 or 6v6. In 3v3 I would say maybe 10 turns is normal, but it could take a lot longer. I think one competitive 6v6 match that wasn't a draw lasted for 1600 turns.

I was thinking about the state thing
1v1, 4 very different damaging skills, without debuffs and buffs for 8 turns has:
53558 different states
4 294 967 296 branch ends with minimax

I was thinking that maybe you could bundle similar damages together and the number of states would be even more lower

But I got discouraged about thinking it in terms of states after I was thinking about attack buffs and defense debuffs. They will make a lot more states, because they alter the damage done of all the 4 damaging skills and then you could even have multiple buffs and debuffs and even stack them up to 6 times. Also I think switching complicates things as well, but was discouraged by the approach earlier so haven't thought about how much does it do that

distant adder
#

It's good to size the problem, helps figure out an appropriate method. With a classical method it would be easier to develop the explanations but you probably need some kind of deep method to handle the states.

If you use the AlphaGo type model you will get a kind of explanation in that you will be able to output what the model thinks are the best scoring series of moves from the current position - this would be my preference. You may then want some explanation generator to produce something in text. Other models, such as dqn, you can also do that but only for the past moves because it doesn't look forward in the same way. Also, I don't think dqn will manage as well because the games are potentially so long it is likely to see states that are very different to those previously experienced in training.