Interpretable AI for Fighting Games: Recreating and expanding upon Firoiu et al.'s "Beating the World's Best at Super Smash Bros. Melee with Deep Reinforcement Learning" (2017) using Bayesian methods and causal inference instead of black-box neural networks.
Real-time personality tracking and optimization system for Super Smash Bros. Ultimate Amiibo training on Ryujinx emulator.
- Real-time Dashboard - Live web visualization of Amiibo personality changes
- Training Validation - Before/after comparison to verify training effectiveness
- 32+ Parameters - Track all behavioral parameters across 8 personality dimensions
- Auto-Monitoring - Detect and analyze changes as they happen
- Bayesian Optimization - Advanced parameter optimization framework (planned)
- Python 3.7+
- Ryujinx emulator with SSBU
- Amiibo save data in Ryujinx
git clone https://github.com/PaulLunis/Amiibot.git
cd AmiibotNo dependencies to install - uses Python standard library only!
Complete Training Session:
python start_training_session.pyDashboard Only:
python dashboard_server.py
# Open: http://localhost:8000/dashboard.htmlValidation:
python training_validation_workflow.py- Defense - Shielding, defensive play
- Agility - Movement speed, aerial combat
- Offense - Aggression, attack frequency
- Risk-taking - Off-stage play, risky moves
- General Style - Overall combat approach
- Engagement - Pursuit behavior
- Caution - Conservative decisions
- Dynamism - Playstyle variety
Including: offensive, defensive, shield_master, meteor_master, feint_master, air_offensive, item_collector, and many more.
Beautiful web-based visualization with:
- π Radar chart (8-dimensional personality profile)
- π Bar chart (comparative metrics)
- βοΈ Parameter grid (all 32+ values, color-coded)
- Auto-refresh every 2 seconds
In 2017, Firoiu et al. (MIT/NYU) trained deep reinforcement learning agents that defeated top professional Super Smash Bros. Melee players using Actor-Critic networks and weeks of self-play. While groundbreaking, their approach had key limitations:
- Black-box neural networks - no insight into learned strategies
- Weeks of training - computationally expensive
- No opponent modeling - implicit adaptation only
- Uninterpretable - couldn't explain why agents made decisions
This project provides an interpretable alternative by analyzing and optimizing existing Amiibo AI using principled statistical methods from computational cognitive science.
| Aspect | Deep RL (Firoiu 2017) | This Project |
|---|---|---|
| Method | Actor-Critic neural networks | Bayesian parameter optimization |
| Training Time | 1-2 weeks self-play | Hours with Bayesian optimization |
| Interpretability | Black-box (hidden layers) | 32 interpretable parameters |
| Sample Efficiency | Thousands of episodes | 50-100 evaluations (GP-UCB) |
| Opponent Modeling | Implicit in network weights | Explicit Bayesian Theory-of-Mind |
| Causality | Correlational only | Causal structure learning |
| Uncertainty | None | Full posterior distributions |
| Explainability | Post-hoc analysis | Built-in interpretability |
This project bridges three research areas:
- Game AI Research - Interpretable alternative to deep RL for fighting games
- Bayesian Optimization - Sample-efficient parameter search in expensive evaluation settings
- Computational Cognitive Science - Theory-of-Mind opponent modeling and causal inference
Potential Publications:
- "Bayesian Optimization of Interpretable Fighting Game AI"
- "Causal Structure Learning in Game AI Parameters"
- "Theory-of-Mind for Adaptive Amiibo Behavior"
- "Sample-Efficient Alternatives to Deep RL for Fighting Games"
amiibot_behavior_visualizer/
βββ start_training_session.py # All-in-one workflow
βββ dashboard_server.py # Web dashboard server
βββ dashboard.html # Visualization UI
βββ training_validation_workflow.py # Before/after validation
βββ export_personality.py # State exporter
βββ parse_amiibo_bin.py # Core personality decoder
β
βββ docs/ # Documentation
β βββ README.md # Full documentation
β βββ QUICK_REFERENCE.txt # Command reference
β βββ COMPLETE_WORKFLOW_GUIDE.md
β βββ BAYESIAN_OPTIMIZATION_ROADMAP.md
β βββ PPL_INTEGRATION_NOTES.md
β
βββ src/ # Future: Skyline plugin
βββ lib.rs
Direct parameter editing with safety features:
- Write individual parameters or full personality profiles
- Automatic backup before each write
- Verification system ensures writes succeeded
- Reset to blank slate for from-scratch training
- Between-match editing capability
Try it now:
python test_parameter_writer.py # Run test suite
python write_amiibo_parameters.py # Interactive demoSee PHASE4_IMPLEMENTATION_PLAN.md for testing guide.
- Gaussian Process optimization (GP-UCB)
- Thompson sampling
- Sample-efficient parameter search
- Pre-designed optimal builds
- UCB-based template comparison
- Profile save/load system
- Hierarchical Bayesian models (PyMC)
- Causal inference
- Uncertainty quantification
- Gen.jl integration for custom inference
- Active learning with Expected Information Gain
- Opponent modeling (Theory-of-Mind)
- Quick Reference - Command cheat sheet
- Complete Guide - Detailed workflows
- Bayesian Optimization - Advanced methods
- PPL Integration - Gen.jl/PyMC guide
- Save Locations - Technical reference
While deep RL achieved superhuman performance in fighting games (Firoiu et al. 2017), understanding and controlling AI behavior requires interpretability. This project demonstrates that:
- Existing AI can be analyzed - Amiibo already have trained behaviors
- Parameters are interpretable - 32 dimensions with clear meanings
- Optimization is sample-efficient - Bayesian methods need far fewer evaluations
- Causality can be identified - Which parameters actually matter for performance
This project applies cutting-edge computational cognitive science:
- Real-time parameter tracking and visualization
- Training validation with before/after snapshots
- Statistical analysis of behavior changes
- Bayesian Optimization - GP-UCB for sample-efficient parameter search
- Multi-armed Bandits - UCB1 for discrete strategy selection
- Thompson Sampling - Probability matching for exploration
- Hierarchical Bayesian Models (PyMC) - Multi-level parameter relationships
- Causal Structure Learning (DoWhy) - Identify which parameters cause wins
- Uncertainty Quantification - Posterior distributions over parameters
- Gen.jl - Custom inference strategies and active learning
- Theory-of-Mind - Bayesian opponent modeling (inspired by LABTOM)
- Expected Information Gain - Optimal experiment design
- Game AI - Interpretable alternatives to deep RL
- Bayesian Optimization - High-dimensional, expensive evaluation settings
- Causal Inference - Learning parameter-performance relationships
- Cognitive Science - Theory-of-Mind and opponent modeling
- Active Learning - Sample-efficient experiment design
- Inverse RL - Inferring reward functions from behavior
Contributions welcome! Areas of interest:
- Parameter writer implementation
- Bayesian optimizer
- Strategy templates
- Documentation improvements
- Testing on different Amiibo characters
MIT License - see LICENSE file for details
Research Inspiration:
- Firoiu et al. (2017) - "Beating the World's Best at Super Smash Bros. Melee with Deep Reinforcement Learning"
- LABTOM Project - Bayesian Theory-of-Mind framework for agent reasoning
Technical Foundation:
- Amiibo bin file format documentation from the community
- Skyline framework for Switch modding
- Ryujinx emulator team
Computational Methods:
- Gen.jl probabilistic programming language
- PyMC Bayesian inference framework
- DoWhy causal inference library
Questions? Open an issue or contact @PaulLunis
Status: Phases 1-3 complete (Validation + Dashboard), Phases 4-9 planned
Current Version: 1.0.0-beta
Last Updated: October 2025
