street-fighter-ai  by linyiLYi

AI agent for Street Fighter II using deep reinforcement learning

created 2 years ago
6,489 stars

Top 8.0% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a deep reinforcement learning agent capable of defeating the final boss in Street Fighter II: Special Champion Edition. It is designed for researchers and enthusiasts interested in applying RL to classic fighting games, offering a 100% win rate on a specific save state.

How It Works

The AI agent learns by processing raw RGB pixel data directly from the game screen. It leverages OpenAI Gym Retro for game interaction and Stable-Baselines3 for its deep reinforcement learning algorithms. The approach is advantageous for its end-to-end learning capability, directly mapping visual input to game actions without manual feature engineering.

Quick Start & Requirements

  • Install: Create a conda environment (conda create -n StreetFighterAI python=3.8.10), activate it, and pip install -r requirements.txt from the main/ directory.
  • Prerequisites: Python 3.8.10, Anaconda, game ROM for "Street Fighter II: Special Champion Edition" (must be obtained legally and renamed to rom.md), ffmpeg (for video recording).
  • Setup: Requires copying game data files and the ROM into the gym-retro game data folder.
  • Docs: Gym Retro Integration UI (for manual save state capture).

Highlighted Details

  • Achieves a 100% win rate on the first round of the final boss with the ppo_ryu_7000000_steps_updated.zip model, though this state exhibits overfitting.
  • Models at different training stages are available for performance evaluation.
  • Utilizes a "penalty decay" mechanism to mitigate agent "cowardice" (avoiding combat).
  • Training curves can be viewed using Tensorboard.

Maintenance & Community

The project relies on Stable-Baselines3 and OpenAI Gym Retro. No specific community channels or active maintainer information are provided in the README.

Licensing & Compatibility

The project's licensing is not explicitly stated in the README. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The README notes that models exhibit overfitting at later training stages, impacting generalizability. The game ROM must be acquired separately and legally. Administrator privileges may be required for file modifications.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
44 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.