Pretrained AlphaZero agents for Ludax board games
Project description
ludax-agents
Pretrained AlphaZero agents for games in the Ludax board game framework.
Installation
pip install ludax-agents
Or install together with Ludax and its GUI:
pip install 'ludax[gui,agents]'
What's included
Each bundled agent is a ResNet trained via self-play using Gumbel MuZero search. At inference time the agent runs 256 MCTS simulations per move.
| Game | Checkpoint |
|---|---|
| Reversi (Othello) | reversi.ckpt |
Usage
The agents integrate automatically with the Ludax GUI — just install this package and an alphazero option will appear in the policy dropdowns for any supported game.
For programmatic use:
from ludax import LudaxEnvironment
from ludax.games import reversi
from ludax_agents import az_checkpoint_policy, get_checkpoint_path
env = LudaxEnvironment(game_str=reversi)
policy = az_checkpoint_policy(env, get_checkpoint_path("reversi"))
# policy(state_b, rng_key) -> action_b
Adding your own checkpoints
Checkpoints are produced by the AlphaZero trainer in examples/03-alpha-zero/. Copy the best iteration file and rename it <game_id>.ckpt (where game_id matches a key in ludax.games.__all__), then place it in src/ludax_agents/checkpoints/ and rebuild the package.
Links
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ludax_agents-1.0.0.tar.gz.
File metadata
- Download URL: ludax_agents-1.0.0.tar.gz
- Upload date:
- Size: 3.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
612884b50f13c493ef2bc293f9892c2a4b2a1abf3306d05d25ef8c5d27ef27e1
|
|
| MD5 |
5cafd7d5bda9d36874acc0ee7c52abd2
|
|
| BLAKE2b-256 |
476c139498b2bc8c60dc4e6a2e36baa90ea9ad3fefa6e85f02bd18c093257d96
|
File details
Details for the file ludax_agents-1.0.0-py3-none-any.whl.
File metadata
- Download URL: ludax_agents-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d60739c965497bb55bce54446bc7e3260fc48d011414867f3e48e4dab97ce9e9
|
|
| MD5 |
9b77a49d8f021c4518250a2b370f9b0b
|
|
| BLAKE2b-256 |
092defa3e212efe3c38f73abdbd923d94f73d892e96d73292fcbbf7763e66fd5
|