Hello everyone. Some of you may remember Technical Machine (old thread, older thread), the Pokemon AI. Well, it's on Pokemon Showdown now. There are still a couple of minor things left to fix with it on Pokemon Showdown (it just does random battles right now,it doesn't understand U-turn and Baton Pass when used by it, it doesn't quite understand Sleep Talk, it doesn't properly set IVs for Hidden Power), but for the most part, it works, and everything missing should be pretty straightforward to fix.
Technical Machine still only supports Gen 4. Fortunately, I am pretty much done with support for that generation, and I am pretty much done with Pokemon Showdown support.
For reference, if I say "Search to a depth of 2" or "depth = 2": Technical Machine evaluates all possible future positions (or else proves it does not need to) at least that many turns ahead. In other words, it looks at every move it can use and every move the foe can use (plus all random outcomes of those moves) not just on this turn, but also the next turn. Then it scores each position the game ends up in and determines the overall score for each move on the first turn. depth = 2 is my typical testing / debugging depth because TM plays faster than battle animations complete at that level. It seems equivalent in strength to a mediocre player at that depth, but with some teams it plays really bad and some it plays really good. At depth = 3, TM starts playing much stronger. TM can play depth = 4 in reasonable timelines if the opponent is patient (it should still stay within the PS time limits). When TM can support depth = 5, I suspect it could be the strongest player, assuming it understands the battle properly.
The roadmap consists of the following items:
1) Support all generations. I will probably do Gen 3 next due to its similarity with Gen 4. Then I will probably do Gen 1, due to its simplicity, followed by Gen 2. After that, I'll probably move forward in order.
2) Add a better way to manage understanding its data. Right now, TM is a command-line application. I want to expand on this to make it easy to explore TM's decision tree ("Why did it use Sludge Bomb there instead of Grass Knot? Oh it was afraid of you switching to Celebi. Why was it afraid of you switching to Celebi? Oh, because it was afraid of you using Leech Seed. Why was it afraid of you using Leech Seed? Oh, because it scored that branch at -630, but it only scored Recover at -100."), to be able to easily tell it who to challenge when, etc. Right now, the options are display everything in case you want to look at it (in which case it's overwhelming and hard to navigate) or print almost nothing.
3) Make it faster so I can search deeper.
4) Some other fun stuff to improve my evaluation function (translation: play better without searching deeper, possibly by being better at long-term thinking).
Anyway, as a teaser, while testing Technical Machine yesterday, I thought it battled fairly well: Gen 4 random battle with TM searching to a depth of 2. I think TM makes two major blunders this game (they should be fairly obvious), but still manages to remain competitive ;).
AI's team:
Electivire (100.0% HP) @ Focus Sash
Ability: Motor Drive
Nature: Hardy
84 HP / 84 Atk / 84 Def / 84 SpA / 84 SpD / 84 Spe
- Earthquake
- Ice Punch
- Flamethrower
- Thunderbolt
Delcatty (100.0% HP) @ Leftovers
Ability: Cute Charm
Nature: Hardy
84 HP / 84 Atk / 84 Def / 84 SpA / 84 SpD / 84 Spe
- Sing
- Return
- Thunder Wave
- Wish
Venusaur (100.0% HP) @ Black Sludge
Ability: Overgrow
Nature: Hardy
84 HP / 84 Atk / 84 Def / 84 SpA / 84 SpD / 84 Spe
- Hidden Power (remember that TM assumes this is Hidden Power Dark)
- Sleep Powder
- Power Whip
- Leech Seed
Qwilfish (100.0% HP) @ Black Sludge
Ability: Poison Point
Nature: Hardy
84 HP / 84 Atk / 84 Def / 84 SpA / 84 SpD / 84 Spe
- Thunder Wave
- Toxic Spikes
- Explosion
- Waterfall
Mightyena (100.0% HP) @ Leftovers
Ability: Intimidate
Nature: Hardy
84 HP / 84 Atk / 84 Def / 84 SpA / 84 SpD / 84 Spe
- Return
- Sucker Punch
- Super Fang
- Taunt
Mesprit (100.0% HP) @ Leftovers
Ability: Levitate
Nature: Hardy
84 HP / 84 Atk / 84 Def / 84 SpA / 84 SpD / 84 Spe
- Calm Mind
- Ice Beam
- Thunderbolt
- Psychic
Technical Machine still only supports Gen 4. Fortunately, I am pretty much done with support for that generation, and I am pretty much done with Pokemon Showdown support.
For reference, if I say "Search to a depth of 2" or "depth = 2": Technical Machine evaluates all possible future positions (or else proves it does not need to) at least that many turns ahead. In other words, it looks at every move it can use and every move the foe can use (plus all random outcomes of those moves) not just on this turn, but also the next turn. Then it scores each position the game ends up in and determines the overall score for each move on the first turn. depth = 2 is my typical testing / debugging depth because TM plays faster than battle animations complete at that level. It seems equivalent in strength to a mediocre player at that depth, but with some teams it plays really bad and some it plays really good. At depth = 3, TM starts playing much stronger. TM can play depth = 4 in reasonable timelines if the opponent is patient (it should still stay within the PS time limits). When TM can support depth = 5, I suspect it could be the strongest player, assuming it understands the battle properly.
The roadmap consists of the following items:
1) Support all generations. I will probably do Gen 3 next due to its similarity with Gen 4. Then I will probably do Gen 1, due to its simplicity, followed by Gen 2. After that, I'll probably move forward in order.
2) Add a better way to manage understanding its data. Right now, TM is a command-line application. I want to expand on this to make it easy to explore TM's decision tree ("Why did it use Sludge Bomb there instead of Grass Knot? Oh it was afraid of you switching to Celebi. Why was it afraid of you switching to Celebi? Oh, because it was afraid of you using Leech Seed. Why was it afraid of you using Leech Seed? Oh, because it scored that branch at -630, but it only scored Recover at -100."), to be able to easily tell it who to challenge when, etc. Right now, the options are display everything in case you want to look at it (in which case it's overwhelming and hard to navigate) or print almost nothing.
3) Make it faster so I can search deeper.
4) Some other fun stuff to improve my evaluation function (translation: play better without searching deeper, possibly by being better at long-term thinking).
Anyway, as a teaser, while testing Technical Machine yesterday, I thought it battled fairly well: Gen 4 random battle with TM searching to a depth of 2. I think TM makes two major blunders this game (they should be fairly obvious), but still manages to remain competitive ;).
AI's team:
Electivire (100.0% HP) @ Focus Sash
Ability: Motor Drive
Nature: Hardy
84 HP / 84 Atk / 84 Def / 84 SpA / 84 SpD / 84 Spe
- Earthquake
- Ice Punch
- Flamethrower
- Thunderbolt
Delcatty (100.0% HP) @ Leftovers
Ability: Cute Charm
Nature: Hardy
84 HP / 84 Atk / 84 Def / 84 SpA / 84 SpD / 84 Spe
- Sing
- Return
- Thunder Wave
- Wish
Venusaur (100.0% HP) @ Black Sludge
Ability: Overgrow
Nature: Hardy
84 HP / 84 Atk / 84 Def / 84 SpA / 84 SpD / 84 Spe
- Hidden Power (remember that TM assumes this is Hidden Power Dark)
- Sleep Powder
- Power Whip
- Leech Seed
Qwilfish (100.0% HP) @ Black Sludge
Ability: Poison Point
Nature: Hardy
84 HP / 84 Atk / 84 Def / 84 SpA / 84 SpD / 84 Spe
- Thunder Wave
- Toxic Spikes
- Explosion
- Waterfall
Mightyena (100.0% HP) @ Leftovers
Ability: Intimidate
Nature: Hardy
84 HP / 84 Atk / 84 Def / 84 SpA / 84 SpD / 84 Spe
- Return
- Sucker Punch
- Super Fang
- Taunt
Mesprit (100.0% HP) @ Leftovers
Ability: Levitate
Nature: Hardy
84 HP / 84 Atk / 84 Def / 84 SpA / 84 SpD / 84 Spe
- Calm Mind
- Ice Beam
- Thunderbolt
- Psychic