Skip to main content

License PyPI PyPI - Python Version Documentation Status

Introduction

Reinforcement learning agent for Google Research Football.

Code accompanying the paper "TiZero: Mastering Multi-Agent Football with Curriculum Learning and Self-Play" (AAMAS 2023). [paper] [videos].

Installation

  • Follow the instructions in gfootball to set up the environment.
  • pip install gfootball openrl "openrl[selfplay]"
  • pip install tizero (or clone this repo and pip install -e .).
  • test the installation by python3 -m gfootball.play_game --action_set=full.

Evaluate JiDi submissions locally

You can evaluate your agent locally using tizero:

tizero eval --left_agent submission_dir1 --right_agent submission_dir2 --total_game 10

For example, you can evaluate tizero with random agent as below:

tizero eval --left_agent submission/tizero --right_agent submission/random_agent --total_game 10

For evaluations for JiDi submissions on other games, please refer to the Arena of OpenRL and this example for the snake game.

Show a saved dump file

  • show detailed infomation of a match via: tizero show dump_file
  • show keypoints of a mactch via: tizero keypoint dump_file

You can download an example dump file from here.

Then execute: tizero show daily_6484285.dump or tizero keypoint daily_6484285.dump. Then you will see a GUI as below:

Convert dump file to video

After the installation, you can use tizero to convert a dump file to a video file. The usage is tizero dump2video <dump_file> <output_dir> --episode_length <the length> --render_type <2d/3d>.

You can download an example dump file from here. And then execute tizero dump2video daily_6484285.dump ./ in your terminal. By default, the episode length is 3000 and the render type is 2d. Wait a minute, you will get a video file named daily_6484285.avi in your current directory.

Submit TiZero to JIDI(及第评测平台)

JIDI is a public evaluation platform for RL agents. You can submit your agent of GRF at: http://www.jidiai.cn/env_detail?envid=34.

We provide several agents under ./submission/ directory, which can be submitted to JIDI directly:

  • ./submission/tizero: the final model of TiZero for JIDI submission, which ranked 1st on October 28th, 2022.
  • ./submission/random_agent: the random agent for JIDI submission.

Cite

Please cite our paper if you use our codes or our weights in your own work:

@article{lin2023tizero,
  title={TiZero: Mastering Multi-Agent Football with Curriculum Learning and Self-Play},
  author={Lin, Fanqi and Huang, Shiyu and Pearce, Tim and Chen, Wenze and Tu, Wei-Wei},
  journal={arXiv preprint arXiv:2302.07515},
  year={2023}
}

Metadata

Release files for tizero 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tizero 0.0.3
File Size Uploaded
tizero-0.0.3.tar.gz 50.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tizero 0.0.3
File Interpreter ABI Platform
tizero-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 139.5 kB

Release files / tizero-0.0.3.tar.gz

Download URL tizero-0.0.3.tar.gz
Size 50.1 kB
Tags Source
SHA-256 checksum
How to use checksums
123f2d7ff2fbe143e7551637b73f62dd6b598134613e982aa1ffff032b0fa9e3
BLAKE2b-256 checksum
How to use checksums
04e26d713d360d76e9504571d815125a033492ec0b9c5e4be89ecd5c799fd040
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / tizero-0.0.3-py3-none-any.whl

Download URL tizero-0.0.3-py3-none-any.whl
Size 89.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37e9b57ed26e60a18c5352eaa5ffb2901f96388952ee436630000e69157d7566
BLAKE2b-256 checksum
How to use checksums
0ca524e6ec60de76b99b1a23ee59d6a76cc3d7021d2a631ccd1d74dcb6e73329
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page