pyaiplayer
A tool to let human play game against AI model.
Today there are quite many python RL(reinforcement learning) models that can play arcade game, e.g. stree fighter. Models are trained in an internal environment, such as gym-retro environment, and it is not inter-actable (you cannot interact with the environment via your mouse or keyboard), which means human cannot play with/against the model you trained. It will be interesting and exciting that human can play with/against the model you trained, that's why I invented this library and share it with you guys.
You can refer to test_human_vs_ai.py which is an example for main function.
There are not too many code in this library, it is more like a reference, if you are trying to do similar thing, i.e. create a human vs AI inter-actable gym-retro environment. You may find some answer when you encounter technical problems and difficulties.
API (very simple, just two lines): env = EnvironmentWrapper(env, model) #env is grm-retro environment, normally created by retro.make method. #model is the model you trained.
then, play
env.play()
keyboard ASDW + jkluio + b (SELECT) + n(START)
press t to save current state as file saved_state.state
Force close the window whenever you want.
Metadata
Release files for pyaiplayer 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyaiplayer-0.1.3.tar.gz | 7.8 kB | Without provenance | Details for pyaiplayer-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyaiplayer-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for pyaiplayer-0.1.3-py3-none-any.whl |
Total release size: 16.5 kB
Release files / pyaiplayer-0.1.3.tar.gz
| Download URL | pyaiplayer-0.1.3.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1abf695835d839965a13601254fa878932081b23cee82dfe428e10562cf16502
|
|
BLAKE2b-256 checksum How to use checksums |
1803b7e5053ec4a33846da6b4076e4c105dcf8be0abb4ba46656e38672c717f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.8.10
|
Release files / pyaiplayer-0.1.3-py3-none-any.whl
| Download URL | pyaiplayer-0.1.3-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe9eceb48518aa8063acef6167dbf1e2805bb67e314b793d2c0e26e213285992
|
|
BLAKE2b-256 checksum How to use checksums |
53bee2bb55d7ab406469ce3fc2eb7f5bd95aa37dd2cd744d096cdf311a24a6a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.8.10
|
Security for pyaiplayer 0.1.3
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.