• Home
  • Work Experience
  • Projects

Magic AI Project Overview

Magic AI

Introduction

This project aims to develop a machine learning model capable of playing Magic: The Gathering (MTG). Due to MTG's complexity, the game was distilled into a simpler version. Encoding the action space posed a challenge, as many actions depend on specific game states, such as blocking, which involves both the attacker and the blocker.

To address this, each action a player makes during a turn was encoded separately, allowing for multiple consecutive actions until the player passes priority. Although the model is not yet perfect and needs further refinement, it has successfully defeated opponents using random actions by adopting a more cautious, defensive play style.

Technology

This project utilizes several key technologies to build and train the AI model effectively:

  • Python: The main programming language used for creating the environment and implementing the AI model.
  • PettingZoo: A multi-agent reinforcement learning library that provides the framework for simulating the game environment.
  • Stable-Baselines3 (SB3): A collection of reliable reinforcement learning algorithm implementations that integrate well with PettingZoo.
  • NumPy & Pandas: Libraries used for data processing and manipulation during training.
  • TensorFlow/PyTorch: Frameworks potentially used for building and training neural networks.

Project Repository:

For more details, visit the project repository on GitHub.