Skip to main content

Discord

Badges
Build Nox semantic-release PyPI Read the Docs
Tests coverage pre-commit
Standards SemVer 2.0.0 Conventional Commits
Code uv Ruff Nox ty
Repo GitHub issues GitHub stars GitHub license All Contributors Contributor Covenant

Ludotastic

Welcome to Ludotastic's documentation!

Where humans and AI come to play.

Read the Docs

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 ✨

Micael Jarniac
Micael Jarniac

💻 ⚠️ 📖 🚇 🚧 🤔 📆

License

MIT

This project was created with the MicaelJarniac/crustypy template.

Metadata

Release files for ludotastic 0.3.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 ludotastic 0.3.0
File Size Uploaded Provenance Actions
ludotastic-0.3.0.tar.gz 277.4 kB With provenance Details for ludotastic-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ludotastic 0.3.0
File Interpreter ABI Platform Actions
ludotastic-0.3.0-py3-none-any.whl Python 3 none any Details for ludotastic-0.3.0-py3-none-any.whl

Total release size: 349.9 kB

Release files / ludotastic-0.3.0.tar.gz

Download URL ludotastic-0.3.0.tar.gz
Size 277.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6709448c5b85c8b60cdb7b3e93f5692b9c68a9c60e84b70fe301d88ede2acd88
BLAKE2b-256 checksum
How to use checksums
1c075cc29cbf80c8aced6f679726b4974c997b2310f860f6fbe16d20bb924c58
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 10, 2026.

Transparency log

Release files / ludotastic-0.3.0-py3-none-any.whl

Download URL ludotastic-0.3.0-py3-none-any.whl
Size 72.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68987d35849bccdde64b7de062f87b1196866bcc2c004f8453cb7c3713ce6acd
BLAKE2b-256 checksum
How to use checksums
4a408975de72ebbbd922e6a874de5b59ace570389a423e61b1d28c155a89e671
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 10, 2026.

Transparency log

Security for ludotastic 0.3.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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ludotastic-0.3.0.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 10, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files Full provenance

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