@@ -8,29 +8,21 @@ YGO Agent is a project to create a Yu-Gi-Oh! AI using deep learning (LLMs, RL).
## ygoai
`ygoai` is a set of AI agents for playing Yu-Gi-Oh! It aims to achieve superhuman performance like AlphaGo and AlphaZero, with or without human knowledge. Currently, we focus on using reinforcement learning to train the agents.
## TODO
### Documentation
- Add documentations of building and running
### Training
- Eval with old models during training
- MTCS-based training
## Usage
### Inference
- MCTS-based planning
- Support of play in YGOPro
### Obtain a trained agent
We provide some trained agents in the [releases](https://github.com/sbl1996/ygo-agent/releases/tag/v0.1). Check these `ptj` TorchScript files and download them to your local machine. The following usage assumes you have it.
## Usage
Notice that the provided `ptj` can only run on GPU, but not CPU. Actually, the agent can run in real-time on CPU, we will provide a CPU version in the future.
### Serialize agent
### Play against the agent
After training, we can serialize the trained agent model to a file for later use without keeping source code of the model. The serialized model file will end with `.ptj` (PyTorch JIT) extension.
We can use `eval.py` to play against the trained agent with a MUD-like interface in the terminal.
You can set `--num_envs=1 --verbose --record` to generate `.yrp` replay files.
### Serialize agent
After training, we can serialize the trained agent model to a file for later use without keeping source code of the model. The serialized model file will end with `.ptj` (PyTorch JIT) extension.