YGO-Agent is an open-source reinforcement learning framework designed to train AI agents to play Yu-Gi-Oh card game. It integrates with YGOPRO simulator to model game states, define action spaces, and compute rewards. Built on Python and PyTorch, it supports DQN-based training, logging of performance metrics, and customizable configurations. Users can simulate thousands of duels, fine-tune strategies, and evaluate agents against built-in or human opponents.
YGO-Agent is an open-source reinforcement learning framework designed to train AI agents to play Yu-Gi-Oh card game. It integrates with YGOPRO simulator to model game states, define action spaces, and compute rewards. Built on Python and PyTorch, it supports DQN-based training, logging of performance metrics, and customizable configurations. Users can simulate thousands of duels, fine-tune strategies, and evaluate agents against built-in or human opponents.
The YGO-Agent framework allows researchers and enthusiasts to develop AI bots that play the Yu-Gi-Oh card game using reinforcement learning. It wraps the YGOPRO game simulator into an OpenAI Gym-compatible environment, defining state representations such as hand, field, and life points, and action representations including summoning, spell/trap activation, and attacking. Rewards are based on win/loss outcomes, damage dealt, and game progress. The agent architecture uses PyTorch to implement DQN, with options for custom network architectures, experience replay, and epsilon-greedy exploration. Logging modules record training curves, win rates, and detailed move logs for analysis. The framework is modular, enabling users to replace or extend components such as the reward function or action space.
Who will use YGO-Agent?
Reinforcement Learning Researchers
Game AI Developers
Yu-Gi-Oh Enthusiasts
AI Students and Educators
How to use the YGO-Agent?
Step1: Clone the repository from GitHub.
Step2: Install dependencies via pip install -r requirements.txt.
Step3: Download and configure the YGOPRO simulator path in config.yml.
Step4: Launch the simulator and ensure it runs headlessly.
Step5: Run python train.py to start agent training.
Step6: Use python evaluate.py --model to assess agent performance.