Ludotastic
Welcome to Ludotastic's documentation!
Where humans and AI come to play.
Installation
PyPI
ludotastic is available on PyPI:
# With uv
uv add ludotastic
# With pip
pip install ludotastic
# With Poetry
poetry add ludotastic
GitHub
You can also install the latest version of the code directly from GitHub:
# With uv
uv add git+https://github.com/MicaelJarniac/ludotastic
# With pip
pip install git+git://github.com/MicaelJarniac/ludotastic
# With Poetry
poetry add git+git://github.com/MicaelJarniac/ludotastic
Usage
Ludotastic is a playground for pitting people, scripted bots and AI models
against each other in games. Any model Pydantic AI supports can
play, including decision models such as TypeSafe's
Jev (typesafe:jev-latest).
Set the API keys for the models you want to use, such as TYPESAFE_API_KEY or
OPENAI_API_KEY, then start the playground:
ludotastic serve
Open http://127.0.0.1:8080 to set up and watch matches, browse past matches
and compare results. The REST API lives under /api, documented at /docs.
Matches can also run headless, which is handy for comparing models:
ludotastic games
ludotastic play tictactoe typesafe:jev-latest bot:minimax --rounds 10
ludotastic play tictactoe openai:gpt-6.1-sol@structured anthropic:claude-opus-5-5@tools
Each player is bot:NAME, or a model name with an optional action mode:
@choice: pick one of the legal moves, each described in words. The model can never make an illegal move, and this mode suits decision models best.@structured: fill in the game's move model. Illegal moves go back to the model for another try.@tools: look at the game through tools, then submit a move.
Settings come from LUDOTASTIC_* environment variables or a .env file; see
[Settings][ludotastic.Settings].
Writing a game
A game is a [Game][ludotastic.Game] subclass whose states and moves are
Pydantic models. Ludotastic finds games through the ludotastic.games entry
point group, so a game can ship in its own package:
[project.entry-points."ludotastic.games"]
connect-four = "ludotastic_connect_four:ConnectFour"
The bundled games, such as Tic-Tac-Toe, are registered the same way
and make good templates. A game can also provide its own scripted bots, extra AI
tools and a NiceGUI renderer; games without one get a generic text view. Games
are turn-based (Timing.STEP) or real-time (Timing.TICK), where a player that
is too slow on a tick loses its turn.
How a game describes its state in [observe][ludotastic.Game.observe] affects
how well models play it, sometimes a lot: see the
Tic-Tac-Toe notes for a measured example.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
More details can be found in CONTRIBUTING.
Contributors ✨
License
This project was created with the MicaelJarniac/crustypy template.
Metadata
Release files for ludotastic 0.2.1
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 |
|---|---|---|---|---|
| ludotastic-0.2.1.tar.gz | 266.0 kB | With provenance | Details for ludotastic-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ludotastic-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for ludotastic-0.2.1-py3-none-any.whl |
Total release size: 330.1 kB
Release files / ludotastic-0.2.1.tar.gz
| Download URL | ludotastic-0.2.1.tar.gz |
|---|---|
| Size | 266.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
438d56b55e149e33178bbb132b50c5f8064cfde2cfc5b11241e23a07f59b33ab
|
|
BLAKE2b-256 checksum How to use checksums |
8fa491e3077ff9121d4d65f8480269f4ae75e616f8e1ee92132200b4355f2736
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logRelease files / ludotastic-0.2.1-py3-none-any.whl
| Download URL | ludotastic-0.2.1-py3-none-any.whl |
|---|---|
| Size | 64.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac1e7c9cd4f9be43fa4c2e3da31d6aa94a92265d163cbdb798c4820a61648d11
|
|
BLAKE2b-256 checksum How to use checksums |
a3732c1bd98ceabb749aff5e6e627d338683514fae2ddd58a37461ebb3e70338
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logSecurity for ludotastic 0.2.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for ludotastic-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
Transparency logA 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.