Conquering Samurai Shodown II on a Single Machine: A Hardware-Grounded Mixture-of-Experts Architecture with Physical-Invariant Best-of-3 Arbitration

Training autonomous fighting-game agents on classic arcade hardware under single-machine compute budgets presents compounding challenges: extreme damage lethality, severe inter-character gradient conflict, camera-zoom HUD distortion, and subtle evaluation pitfalls across multi-round Best-of-3 (Bo3) matches. This system and empirical methodology paper documents the end-to-end engineering of an autonomous AI agent for SNK's Neo-Geo weapon fighter Samurai Shodown II (samsho2) running on MAME 0.281. Rather than relying on monolithic from-scratch reinforcement learning—which empirically collapsed into passive corner-turtling and cross-opponent forgetting on a single PC—we introduce a four-layer architecture combining: 1. Direct Neo-Geo WRAM Hardware Entity Perception: Reads authoritative logical health (UID+0xBB), normalized horizontal distance (|dx|/512), hit-damage latch (0x105ED3), and hardware-verified character IDs (0x00–0x10) directly from emulator memory via a lockstep Lua TCP bridge.2. 9-Action SMDP Semantic Combat Intent Space: Compresses 60 Hz frame-level joystick inputs into nine tactical intents executed by a low-level macro/reflex layer.3. Physically Isolated Mixture-of-Experts (MoE) Architecture: Decouples all 16 opponents into independent JSON policy configurations, pairing per-round policies (PerRoundPolicy) with closed-loop distance-reactive controllers (DistanceReactivePolicy) that solve fullscreen boss zoning (Mizuki and Sieger).4. Physical-Invariant Bo3 Arbitration: Introduces six evaluation integrity rules and a three-guard Bo3MatchController designed in response to two real-world evaluation failures (BUG-17 timeout sign inversion and BUG-18 transition-flicker phantom rounds). Across live 1x 60 FPS MAME emulation, AI Haohmaru achieves 16/16 full-roster Bo3 victories—audited with 18.0-second post-KO celebration recordings and synchronized Chinese/English commentary timelines—and supports smooth, zero-conflict True 2P VS human-versus-AI play. We also candidly analyze sequence generalization limits against adaptive human tactics and outline a concrete MoE-to-PPO and Offline RL training roadmap. Includes both the English edition (6 pages, IEEE/arXiv two-column style) and the Chinese edition (4 pages). Open-Source Code & Documentation: https://github.com/footballqq/samsho2-moe-ai Note: This work and its companion repository do NOT distribute any copyrighted game ROMs, BIOS files, or third-party emulator binaries; it is intended strictly for reinforcement learning research and educational demonstration.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-11-24
DOI
https://doi.org/10.5281/zenodo.24492380
Primary Topic
Artificial Intelligence in Games
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Conquering Samurai Shodown II on a Single Machine: A Hardware-Grounded Mixture-of-Experts Architecture with Physical-Invariant Best-of-3 Arbitration

Qi Xinyang
1 links
Zenodo (CERN European Organization for Nuclear Research)
Artificial Intelligence in Games
preprint

Conquering Samurai Shodown II on a Single Machine: A Hardware-Grounded Mixture-of-Experts Architecture with Physical-Invariant Best-of-3 Arbitration

Qi Xinyang
preprint en

Abstract

Training autonomous fighting-game agents on classic arcade hardware under single-machine compute budgets presents compounding challenges: extreme damage lethality, severe inter-character gradient conflict, camera-zoom HUD distortion, and subtle evaluation pitfalls across multi-round Best-of-3 (Bo3) matches. This system and empirical methodology paper documents the end-to-end engineering of an autonomous AI agent for SNK's Neo-Geo weapon fighter Samurai Shodown II (samsho2) running on MAME 0.281. Rather than relying on monolithic from-scratch reinforcement learning—which empirically collapsed into passive corner-turtling and cross-opponent forgetting on a single PC—we introduce a four-layer architecture combining: 1. Direct Neo-Geo WRAM Hardware Entity Perception: Reads authoritative logical health (UID+0xBB), normalized horizontal distance (|dx|/512), hit-damage latch (0x105ED3), and hardware-verified character IDs (0x00–0x10) directly from emulator memory via a lockstep Lua TCP bridge.2. 9-Action SMDP Semantic Combat Intent Space: Compresses 60 Hz frame-level joystick inputs into nine tactical intents executed by a low-level macro/reflex layer.3. Physically Isolated Mixture-of-Experts (MoE) Architecture: Decouples all 16 opponents into independent JSON policy configurations, pairing per-round policies (PerRoundPolicy) with closed-loop distance-reactive controllers (DistanceReactivePolicy) that solve fullscreen boss zoning (Mizuki and Sieger).4. Physical-Invariant Bo3 Arbitration: Introduces six evaluation integrity rules and a three-guard Bo3MatchController designed in response to two real-world evaluation failures (BUG-17 timeout sign inversion and BUG-18 transition-flicker phantom rounds). Across live 1x 60 FPS MAME emulation, AI Haohmaru achieves 16/16 full-roster Bo3 victories—audited with 18.0-second post-KO celebration recordings and synchronized Chinese/English commentary timelines—and supports smooth, zero-conflict True 2P VS human-versus-AI play. We also candidly analyze sequence generalization limits against adaptive human tactics and outline a concrete MoE-to-PPO and Offline RL training roadmap. Includes both the English edition (6 pages, IEEE/arXiv two-column style) and the Chinese edition (4 pages). Open-Source Code & Documentation: https://github.com/footballqq/samsho2-moe-ai Note: This work and its companion repository do NOT distribute any copyrighted game ROMs, BIOS files, or third-party emulator binaries; it is intended strictly for reinforcement learning research and educational demonstration.

Zenodo (CERN European Organization for Nuclear Research)
Artificial Intelligence in Games
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon