Teach a computer to play any game
Project description
Zero Play
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.
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file zero_play-0.3.0.tar.gz
.
File metadata
- Download URL: zero_play-0.3.0.tar.gz
- Upload date:
- Size: 41.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7acb73f4cb6e367475eab4d845c6e658274a4e2327ab9179c05ddbc381e2dd69 |
|
MD5 | 7c10469af59aa24690d7ecf42b9d2d94 |
|
BLAKE2b-256 | 6e970ad3d37aa778356f69d31891367650f151c1079ca941ae2be6624b5c3540 |
File details
Details for the file zero_play-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: zero_play-0.3.0-py3-none-any.whl
- Upload date:
- Size: 67.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7648cba221818a50a4390e810585775a9364148fb3d9f655b4af60c6e03c56a4 |
|
MD5 | 46590480ad414f33766f6fbdf692b2ab |
|
BLAKE2b-256 | c10280e4a5599fd288a5b2fddae97050dd1d901c10aae919dc68238a2128dcaf |