tizero


Nametizero JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/OpenRL-Lab/TiZero
SummaryToolkit and agents for Google Research Football
upload_time2023-09-01 09:59:43
maintainer
docs_urlNone
authoropenrl contributors
requires_python>=3.8
license
keywords reinforcement-learning multi-agent google research football
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
<img width="300px" height="auto" src="./docs/figures/TiZero.png">
</div>

<div align="center">
<img weight="300px" height="auto" src="./docs/figures/screen_800.png">
</div>

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![PyPI](https://img.shields.io/pypi/v/tizero)](https://pypi.org/project/tizero/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tizero)
[![Documentation Status](https://readthedocs.org/projects/tizero/badge/?version=latest)](https://tizero.readthedocs.io/en/latest/?badge=latest)


### 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](https://arxiv.org/abs/2302.07515)] [[videos](https://www.youtube.com/watch?v=U9REh0otmVU)]. 

<div align="center">
<img height="300px" height="auto" src="./docs/figures/football_trueskill.png">
</div>

### Installation

- Follow the instructions in [gfootball](https://github.com/google-research/football#on-your-computer) 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:

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

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

```bash
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](https://openrl-docs.readthedocs.io/en/latest/arena/index.html) of OpenRL 
and this [example](https://github.com/OpenRL-Lab/openrl/tree/main/examples/snake) 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](http://jidiai.cn/daily_6484285/daily_6484285.dump). 

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

<div align="center">
<img weight="300px" height="auto" src="./docs/_static/images/show_dump.png">
</div>

### 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](http://jidiai.cn/daily_6484285/daily_6484285.dump). 
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(及第评测平台)

<div align="center">
<img width="400px" height="auto" src="./docs/figures/jidi.png">
</div>


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](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}
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/OpenRL-Lab/TiZero",
    "name": "tizero",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "reinforcement-learning multi-agent google research football",
    "author": "openrl contributors",
    "author_email": "huangsy1314@163.com",
    "download_url": "https://files.pythonhosted.org/packages/04/e2/6d713d360d76e9504571d815125a033492ec0b9c5e4be89ecd5c799fd040/tizero-0.0.3.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n<img width=\"300px\" height=\"auto\" src=\"./docs/figures/TiZero.png\">\n</div>\n\n<div align=\"center\">\n<img weight=\"300px\" height=\"auto\" src=\"./docs/figures/screen_800.png\">\n</div>\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![PyPI](https://img.shields.io/pypi/v/tizero)](https://pypi.org/project/tizero/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tizero)\n[![Documentation Status](https://readthedocs.org/projects/tizero/badge/?version=latest)](https://tizero.readthedocs.io/en/latest/?badge=latest)\n\n\n### Introduction\n\nReinforcement learning agent for Google Research Football.\n\nCode accompanying the paper \n\"TiZero: Mastering Multi-Agent Football with Curriculum Learning and Self-Play\" (AAMAS 2023). [[paper](https://arxiv.org/abs/2302.07515)] [[videos](https://www.youtube.com/watch?v=U9REh0otmVU)]. \n\n<div align=\"center\">\n<img height=\"300px\" height=\"auto\" src=\"./docs/figures/football_trueskill.png\">\n</div>\n\n### Installation\n\n- Follow the instructions in [gfootball](https://github.com/google-research/football#on-your-computer) to set up the environment.\n- `pip install gfootball openrl \"openrl[selfplay]\"`\n- `pip install tizero` (or clone this repo and `pip install -e .`).\n- test the installation by `python3 -m gfootball.play_game --action_set=full`.\n\n### Evaluate JiDi submissions locally\n\nYou can evaluate your agent locally using tizero:\n\n```bash\ntizero eval --left_agent submission_dir1 --right_agent submission_dir2 --total_game 10\n```\n\nFor example, you can evaluate tizero with random agent as below:\n\n```bash\ntizero eval --left_agent submission/tizero --right_agent submission/random_agent --total_game 10\n```\n\nFor evaluations for JiDi submissions on other games, please refer to the [Arena](https://openrl-docs.readthedocs.io/en/latest/arena/index.html) of OpenRL \nand this [example](https://github.com/OpenRL-Lab/openrl/tree/main/examples/snake) for the snake game.\n\n### Show a saved dump file\n\n- show detailed infomation of a match via: `tizero show dump_file`\n- show keypoints of a mactch via: `tizero keypoint dump_file`\n\nYou can download an example dump file from [here](http://jidiai.cn/daily_6484285/daily_6484285.dump). \n\nThen execute: `tizero show daily_6484285.dump` or `tizero keypoint daily_6484285.dump`. Then you will see a GUI as below:\n\n<div align=\"center\">\n<img weight=\"300px\" height=\"auto\" src=\"./docs/_static/images/show_dump.png\">\n</div>\n\n### Convert dump file to video\n\nAfter the installation, you can use tizero to convert a dump file to a video file.\nThe usage is `tizero dump2video <dump_file> <output_dir> --episode_length <the length> --render_type <2d/3d>`.\n\nYou can download an example dump file from [here](http://jidiai.cn/daily_6484285/daily_6484285.dump). \nAnd then execute `tizero dump2video daily_6484285.dump ./` in your terminal. By default, the episode length is 3000 and the render type is 2d.\nWait a minute, you will get a video file named `daily_6484285.avi` in your current directory.\n\n### Submit TiZero to JIDI(\u53ca\u7b2c\u8bc4\u6d4b\u5e73\u53f0)\n\n<div align=\"center\">\n<img width=\"400px\" height=\"auto\" src=\"./docs/figures/jidi.png\">\n</div>\n\n\nJIDI is a public evaluation platform for RL agents. You can submit your agent of GRF at: [http://www.jidiai.cn/env_detail?envid=34](http://www.jidiai.cn/env_detail?envid=34).\n\nWe provide several agents under `./submission/` directory,  which can be submitted to JIDI directly:\n\n- `./submission/tizero`: the final model of TiZero for JIDI submission, which ranked 1st on October 28th, 2022.\n- `./submission/random_agent`: the random agent for JIDI submission.\n\n\n### Cite\n\nPlease cite our paper if you use our codes or our weights in your own work:\n\n```\n@article{lin2023tizero,\n  title={TiZero: Mastering Multi-Agent Football with Curriculum Learning and Self-Play},\n  author={Lin, Fanqi and Huang, Shiyu and Pearce, Tim and Chen, Wenze and Tu, Wei-Wei},\n  journal={arXiv preprint arXiv:2302.07515},\n  year={2023}\n}\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Toolkit and agents for Google Research Football",
    "version": "0.0.3",
    "project_urls": {
        "Code": "https://github.com/OpenRL-Lab/TiZero",
        "Documentation": "https://tizero.readthedocs.io/",
        "Homepage": "https://github.com/OpenRL-Lab/TiZero"
    },
    "split_keywords": [
        "reinforcement-learning",
        "multi-agent",
        "google",
        "research",
        "football"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ca524e6ec60de76b99b1a23ee59d6a76cc3d7021d2a631ccd1d74dcb6e73329",
                "md5": "3d006cc86537ffd790a2552764f54ac7",
                "sha256": "37e9b57ed26e60a18c5352eaa5ffb2901f96388952ee436630000e69157d7566"
            },
            "downloads": -1,
            "filename": "tizero-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3d006cc86537ffd790a2552764f54ac7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 89355,
            "upload_time": "2023-09-01T09:59:41",
            "upload_time_iso_8601": "2023-09-01T09:59:41.511860Z",
            "url": "https://files.pythonhosted.org/packages/0c/a5/24e6ec60de76b99b1a23ee59d6a76cc3d7021d2a631ccd1d74dcb6e73329/tizero-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "04e26d713d360d76e9504571d815125a033492ec0b9c5e4be89ecd5c799fd040",
                "md5": "0d8b9a1e850f144c458fb48799860212",
                "sha256": "123f2d7ff2fbe143e7551637b73f62dd6b598134613e982aa1ffff032b0fa9e3"
            },
            "downloads": -1,
            "filename": "tizero-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "0d8b9a1e850f144c458fb48799860212",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 50100,
            "upload_time": "2023-09-01T09:59:43",
            "upload_time_iso_8601": "2023-09-01T09:59:43.082967Z",
            "url": "https://files.pythonhosted.org/packages/04/e2/6d713d360d76e9504571d815125a033492ec0b9c5e4be89ecd5c799fd040/tizero-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-01 09:59:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OpenRL-Lab",
    "github_project": "TiZero",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "tizero"
}
        
Elapsed time: 0.27372s