street-fighter-ai

This is an AI agent for Street Fighter II Champion Edition.

open-sourceagent-frameworks
Visit WebsiteView on GitHub
6.5k
Stars
+543
Stars/month
0
Releases (6m)

Overview

SFighterAI is a deep reinforcement learning-powered AI agent specifically designed to master Street Fighter II Champion Edition. The agent operates purely on visual input, making strategic decisions based solely on RGB pixel values from the game screen without any hardcoded game logic or cheats. Trained using advanced deep reinforcement learning techniques with OpenAI Gym Retro and Stable-Baselines3, this project demonstrates the potential of AI to learn complex fighting game strategies through visual observation alone. The AI achieves impressive performance with a 100% win rate in the final boss level's first round, showcasing the effectiveness of pixel-based learning approaches. The project includes comprehensive training logs, model weights from different training stages, and detailed performance analytics viewable through Tensorboard. While specifically trained for the final boss battle, the underlying framework and methodologies can be adapted for other fighting game scenarios or similar visual-based gaming challenges.

Pros

  • + Achieves 100% win rate against the final boss in the provided scenario, demonstrating effective learning
  • + Uses pure visual input (RGB pixels) without game hacks, making it a legitimate AI approach
  • + Includes comprehensive training infrastructure with logs, model weights, and Tensorboard visualization

Cons

  • - Suffers from overfitting issues, limiting generalization beyond the specific trained scenario
  • - Requires the Street Fighter II ROM file which is not provided due to licensing restrictions
  • - Limited to a specific save state and may not perform well in other game situations

Use Cases

Getting Started

1. Set up Python 3.8.10 environment with Anaconda and install requirements from main/requirements.txt. 2. Copy game configuration files (data.json, metadata.json, scenario.json, and save state) to your gym-retro Street Fighter game folder. 3. Obtain the Street Fighter II ROM file and run test.py to observe the trained AI agent in action.