Pokémon Nash Study

A Study of Nash Equilibria in Pokémon

This project builds a Pokémon battle AI to investigate where the game's Nash equilibria actually lie. There's no point keeping the findings to myself, so I'm sharing them here — with playable, GPU-free demos of the learned policies.

Stage 3b

Cycling in an extreme matchup — Goodra-Hisui vs Cloyster

Goal. Build an extreme favorable/unfavorable matchup and see whether the decision collapses to a single option — always switch, or always attack.

Setup. I paired a Special-Defense-focused Hisuian Goodra with a Defense-focused Cloyster and tuned their movesets to create a perfectly favorable/unfavorable matchup. The two share identical Attack and Special Attack, and every real stat is identical except Defense and Special Defense, which are swapped between them. Shock Wave (Special / Electric / 60 BP) hits Cloyster for super-effective damage; Bulldoze (Physical / Ground / 60 BP) hits Hisuian Goodra super-effectively — but each does very little to the other Pokémon, so switching sharply cuts the damage taken. Movesets are mirrored across the two teams, so for both sides "switching out of a bad matchup gives you a good one," making cycling battles likely. Both Pokémon hold a Covert Cloak, which suppresses the added (secondary) effects of moves. I trained the AI on this and studied the strategy it converged to.

Result. Even in a seemingly clear-cut matchup, surprisingly complex mind games emerged. The tricky part: constrained by real moves, I couldn't build a perfectly symmetric relationship — Bulldoze is neutral (1×) against Cloyster while Shock Wave is resisted (½×) by Hisuian Goodra. As a result, "even in a favorable matchup, don't fire Shock Wave — bait a switch and hit Bulldoze instead" became a very strong line.

Stage 3c

A truly extreme matchup — Goodra vs Cloyster

Goal. Build a truly extreme favorable/unfavorable matchup and test whether the decision collapses to a single option.

Setup. I paired a Special-Defense-focused Goodra with a Defense-focused Cloyster, then gave them fictional moves — a 60-BP physical Fairy move and a 60-BP special Fighting move. Real stats are identical and the type-effectiveness relationships are made perfectly symmetric, to see what happens.

Result. It became considerably simpler, yet complex mind games still emerged. Because you gain an edge by knocking out just one of the opponent's two Pokémon — thereby denying them a switch — bait-switching to focus-fire a single target was effective. In the end, a favorable matchup did not collapse to "always attack," nor an unfavorable one to "always switch."

GitHub repository Built with a Rust battle simulator (WASM) + a pre-computed policy table — no server, no GPU.

ポケモンにおけるナッシュ均衡の研究

このプロジェクトはポケモンAIを作り、ナッシュ均衡がどこにあるのかを調べる試みです。 研究結果を己の胸のうちにとどめておいても仕方ないので公開していきます — 学習したポリシーは、GPU不要でその場で対戦できます。

Stage 3b

極端な有利対面によるサイクル戦 — ヒスイヌメルゴン vs パルシェン

目的。極端な「有利/不利」対面を作り、「交代/攻撃」の一択になるのかを調べる。

概要。とくぼう特化のヒスイヌメルゴンと、ぼうぎょ特化のパルシェンでチームを組ませ、 持ち技を工夫して完全な「有利/不利」対面を作りAIに学習させました。こうげきととくこうの数値を 一致させ、さらにぼうぎょ・とくぼう以外の実数値はすべて一致、ぼうぎょととくぼうだけを反転させた 二匹です。わざは、パルシェンに対して「でんげきは(特殊・でんき・威力60)」、ヒスイヌメルゴンに 対して「じならし(物理・じめん・威力60)」で弱点を突きますが、もう一匹には極端にダメージが 低くなるようにし、交代すればダメージを抑えられる状況にしました。持ち技をチームで反転させ、 お互いに「不利対面から交代すれば有利対面になる」という、サイクル戦が起こりやすい編成にして 学習させ、AIの戦略を調べました。もちものはお互いに隠密マントを持たせ、わざの追加効果を封じています。

結果。有利対面に見えても、かなり複雑な読み合いが生じました。特に難しかった のは、実在するわざの制限により完全な対称関係を作れず、じならしがパルシェンに等倍、でんげきはが ヒスイヌメルゴンに半減になってしまったこと。そのため「有利対面でもでんげきはを撃たずに釣り交換し、 じならしを撃つ」という戦略が非常に効果的になりました。

Stage 3c

真・極端な有利対面によるサイクル戦 — ヌメルゴン vs パルシェン

目的。真に極端な「有利/不利」対面を作り、「交代/攻撃」の一択になるのかを調べる。

概要。とくぼう特化のヌメルゴンと、ぼうぎょ特化のパルシェンでチームを組ませました。さらに、 実在しない「威力60の物理フェアリー技」「威力60の特殊かくとう技」を覚えさせて対戦させています。 実数値は同じで、タイプ相性関係も完全に対称にしてどうなるかを調べました。

結果。だいぶシンプルになりましたが、やはり複雑な読み合いが生じました。相手の どちらか一体だけを倒して交代を封じると有利になれるため、一匹を集中攻撃するための釣り交換が有効 でした。結果として、有利対面でも攻撃一択にはならず、不利対面でも交代一択にはなりませんでした。