Skip to main content

Zero Play Build Badge Coverage Badge PyPI Badge

Teach a computer to play any game

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

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

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.

Metadata

Release files for zero-play 0.5.0

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

Source distribution (sdist)

Source distribution for zero-play 0.5.0
File Size Uploaded Provenance
zero_play-0.5.0.tar.gz 721.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for zero-play 0.5.0
File Interpreter ABI Platform
zero_play-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 806.0 kB

Release files / zero_play-0.5.0.tar.gz

Download URL zero_play-0.5.0.tar.gz
Size 721.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6864c608aa249dc73e7954424b47c4be2bff4b9bfb4814631785d1dbc2d545fb
BLAKE2b-256 checksum
How to use checksums
310374cda69c6d84c0979be15f05ae527e0df1329738cb1541ab2b118dd17369
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release files / zero_play-0.5.0-py3-none-any.whl

Download URL zero_play-0.5.0-py3-none-any.whl
Size 84.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d99ad32e2aa5dd18f1196d2d39d7df9fcfd77829b6cae0e692e989f7cd6c9d27
BLAKE2b-256 checksum
How to use checksums
1e0d60998e65003ceafb60e57464ce9c61fac06b1d34127f8bd5241f61d02fd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Security for zero-play 0.5.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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