[Update]: check out our newest GRF agent here: TiZero: Mastering Multi-Agent Football with Curriculum Learning and Self-Play
Learning-based agent for Google Research Football
Code accompanying the paper "TiKick: Towards Playing Multi-agent Football Full Games from Single-agent Demonstrations". [arxiv][videos]. The implementation in this repositorory is heavily based on https://github.com/marlbenchmark/on-policy.
Update:
- [22.8.11]: 11 vs 11 model is released! Model can be found on Google Drive.
pip install -r requirements.txt
pip install .
(a) First, you should download the trained model from Baidu Yun or Google Drive:
- pre-trained models can be found at:
- Baidu Yun: Click to download Password:vz3a
- Google Drive: Click to download
(b) Then, you should put the actor.pt
under ./models/{scenario_name}/
.
(c) Finally, you can go to the ./scripts/football
folder and execute the evaluation script as below:
cd scripts/football
./evaluate.sh
Then the replay file will be saved into ./results/{scenario_name}/replay/
.
- Hyper-parameters in the evaluation script:
- --replay_save_dir : the replay file will be saved in this directory
- --model_dir : pre-trained model should be placed under this directory
- --n_eval_rollout_threads : number of parallel envs for evaluating rollout
- --eval_num : number of total evaluation times
Once you obtain a replay file, you can convert it to a .avi
file and watch the game.
This can be easily done via:
cd scripts/football
python3 replay2video.py --replay_file ../../results/academy_3_vs_1_with_keeper/replay/your_path.dump
The video file will finally be saved to ./results/{scenario_name}/video/
Please cite our paper if you use our codes or our weights in your own work:
@misc{huang2021tikick,
title={TiKick: Towards Playing Multi-agent Football Full Games from Single-agent Demonstrations},
author={Shiyu Huang and Wenze Chen and Longfei Zhang and Ziyang Li and Fengming Zhu and Deheng Ye and Ting Chen and Jun Zhu},
year={2021},
eprint={2110.04507},
archivePrefix={arXiv},
primaryClass={cs.AI}
}