# Zero Play [![Build Badge]][build] [![Coverage Badge]][codecov] [![PyPI Badge]][pypi]
### Teach a computer to play any game
[Build Badge]: https://github.com/donkirkby/zero-play/actions/workflows/py-build.yml/badge.svg?branch=master
[build]: https://github.com/donkirkby/zero-play/actions
[Coverage Badge]: https://codecov.io/github/donkirkby/zero-play/coverage.svg?branch=master
[codecov]: https://codecov.io/github/donkirkby/zero-play?branch=master
[PyPI Badge]: https://badge.fury.io/py/zero-play.svg
[pypi]: https://badge.fury.io/py/zero-play
[journal]: docs/journal
[screenshot]: https://donkirkby.github.io/zero-play/images/screenshot.png
The zero play library is based on the ideas in the [AlphaGo Zero paper] and the
example Python code in the [alpha-zero-general project]. The goal of this
project is to make a reusable Python library that other projects can build on
to make powerful computer opponents for many different board games. An example
project that uses this library is [Shibumi Games].
It includes a graphical display that you can use to play against the computer
opponent or another human.
![screenshot]
[AlphaGo Zero paper]: https://deepmind.com/blog/alphago-zero-learning-scratch/
[alpha-zero-general project]: https://github.com/suragnair/alpha-zero-general
[Shibumi Games]: https://donkirkby.github.io/shibumi-games/
## Installing Zero Play
Even though Zero Play has a graphical display, it is a regular Python package,
so you can install it with `pip install zero-play`. If you haven't installed
Python packages before, read Brett Cannon's [quick-and-dirty guide].
Then run it with the `zero_play` command.
The default installation generates some errors about `bdist_wheel` that don't
seem to actually cause any problems. You can either ignore them, or install
`wheel` before installing Zero Play.
pip install wheel
pip install zero-play
zero_play
Known bug on Ubuntu 20.04:
> qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though
> it was found.
This is a [PySide2 bug] that is missing some dependencies. You can work around
it by installing those dependencies like this:
sudo apt install libxcb-xinerama0
[quick-and-dirty guide]: https://snarky.ca/a-quick-and-dirty-guide-on-how-to-install-packages-for-python/
[PySide2 bug]: https://bugreports.qt.io/browse/QTBUG-84749
## More Information
If you'd like to help out with the project, or add your own games, see the
`CONTRIBUTING.md` file in the source code. For all the details, look through the
design [journal] for the project.
## Related Projects
Here are some similar projects for inspiration or collaboration:
* I already mentioned the [alpha-zero-general project]. It was a big inspiration, but I'm trying to build something
that's easier to add new games to, or use as a library within another project.
* [Galvanise] looks interesting. It's a mix of Python and C++, using Tensorflow. As of 2020, it looks like a single
developer, without much documentation. The games are defined with GDL, not Python code.
[Galvanise]: https://github.com/richemslie/galvanise_zero
Raw data
{
"_id": null,
"home_page": "https://donkirkby.github.io/zero-play/",
"name": "zero-play",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "boardgames alphazero machine learning mcts",
"author": "Don Kirkby",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/31/03/74cda69c6d84c0979be15f05ae527e0df1329738cb1541ab2b118dd17369/zero_play-0.5.0.tar.gz",
"platform": null,
"description": "# Zero Play [![Build Badge]][build] [![Coverage Badge]][codecov] [![PyPI Badge]][pypi]\n### Teach a computer to play any game\n\n[Build Badge]: https://github.com/donkirkby/zero-play/actions/workflows/py-build.yml/badge.svg?branch=master\n[build]: https://github.com/donkirkby/zero-play/actions\n[Coverage Badge]: https://codecov.io/github/donkirkby/zero-play/coverage.svg?branch=master\n[codecov]: https://codecov.io/github/donkirkby/zero-play?branch=master\n[PyPI Badge]: https://badge.fury.io/py/zero-play.svg\n[pypi]: https://badge.fury.io/py/zero-play\n[journal]: docs/journal\n[screenshot]: https://donkirkby.github.io/zero-play/images/screenshot.png\n\nThe zero play library is based on the ideas in the [AlphaGo Zero paper] and the\nexample Python code in the [alpha-zero-general project]. The goal of this\nproject is to make a reusable Python library that other projects can build on\nto make powerful computer opponents for many different board games. An example\nproject that uses this library is [Shibumi Games].\n\nIt includes a graphical display that you can use to play against the computer\nopponent or another human.\n\n![screenshot]\n\n[AlphaGo Zero paper]: https://deepmind.com/blog/alphago-zero-learning-scratch/\n[alpha-zero-general project]: https://github.com/suragnair/alpha-zero-general\n[Shibumi Games]: https://donkirkby.github.io/shibumi-games/\n\n## Installing Zero Play\nEven though Zero Play has a graphical display, it is a regular Python package,\nso you can install it with `pip install zero-play`. If you haven't installed\nPython packages before, read Brett Cannon's [quick-and-dirty guide].\n\nThen run it with the `zero_play` command.\n\nThe default installation generates some errors about `bdist_wheel` that don't\nseem to actually cause any problems. You can either ignore them, or install\n`wheel` before installing Zero Play.\n\n pip install wheel\n pip install zero-play\n zero_play\n\nKnown bug on Ubuntu 20.04:\n\n> qt.qpa.plugin: Could not load the Qt platform plugin \"xcb\" in \"\" even though\n> it was found.\n\nThis is a [PySide2 bug] that is missing some dependencies. You can work around\nit by installing those dependencies like this:\n\n sudo apt install libxcb-xinerama0\n\n[quick-and-dirty guide]: https://snarky.ca/a-quick-and-dirty-guide-on-how-to-install-packages-for-python/\n[PySide2 bug]: https://bugreports.qt.io/browse/QTBUG-84749\n\n## More Information\nIf you'd like to help out with the project, or add your own games, see the\n`CONTRIBUTING.md` file in the source code. For all the details, look through the\ndesign [journal] for the project.\n\n## Related Projects\nHere are some similar projects for inspiration or collaboration:\n\n* I already mentioned the [alpha-zero-general project]. It was a big inspiration, but I'm trying to build something\n that's easier to add new games to, or use as a library within another project.\n* [Galvanise] looks interesting. It's a mix of Python and C++, using Tensorflow. As of 2020, it looks like a single\n developer, without much documentation. The games are defined with GDL, not Python code.\n\n[Galvanise]: https://github.com/richemslie/galvanise_zero\n",
"bugtrack_url": null,
"license": "",
"summary": "Teach a computer to play any game",
"version": "0.5.0",
"project_urls": {
"Bug Reports": "https://github.com/donkirkby/zero-play/issues",
"Homepage": "https://donkirkby.github.io/zero-play/",
"Source": "https://github.com/donkirkby/zero-play"
},
"split_keywords": [
"boardgames",
"alphazero",
"machine",
"learning",
"mcts"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1e0d60998e65003ceafb60e57464ce9c61fac06b1d34127f8bd5241f61d02fd0",
"md5": "ebab75e46783be72199809d82f31cd0e",
"sha256": "d99ad32e2aa5dd18f1196d2d39d7df9fcfd77829b6cae0e692e989f7cd6c9d27"
},
"downloads": -1,
"filename": "zero_play-0.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ebab75e46783be72199809d82f31cd0e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 84473,
"upload_time": "2023-05-06T22:42:51",
"upload_time_iso_8601": "2023-05-06T22:42:51.566836Z",
"url": "https://files.pythonhosted.org/packages/1e/0d/60998e65003ceafb60e57464ce9c61fac06b1d34127f8bd5241f61d02fd0/zero_play-0.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "310374cda69c6d84c0979be15f05ae527e0df1329738cb1541ab2b118dd17369",
"md5": "236c27324b672273285fd18af6156315",
"sha256": "6864c608aa249dc73e7954424b47c4be2bff4b9bfb4814631785d1dbc2d545fb"
},
"downloads": -1,
"filename": "zero_play-0.5.0.tar.gz",
"has_sig": false,
"md5_digest": "236c27324b672273285fd18af6156315",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 721566,
"upload_time": "2023-05-06T22:42:54",
"upload_time_iso_8601": "2023-05-06T22:42:54.023385Z",
"url": "https://files.pythonhosted.org/packages/31/03/74cda69c6d84c0979be15f05ae527e0df1329738cb1541ab2b118dd17369/zero_play-0.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-06 22:42:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "donkirkby",
"github_project": "zero-play",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "zero-play"
}