Metadata-Version: 2.4
Name: tyrant
Version: 0.1.0
Summary: Secret Hitler board game implementation
Keywords: secret-hitler,board-game,llm,game-engine,social-deduction
Author: Pramod Anandarao
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Games/Entertainment :: Board Games
Classifier: Typing :: Typed
Requires-Dist: frozendict>=2.4.7
Requires-Dist: litellm>=1.91.0 ; extra == 'llm'
Requires-Python: >=3.13
Project-URL: Documentation, https://docs.secretarena.org
Project-URL: Homepage, https://github.com/7673502/tyrant
Project-URL: Issues, https://github.com/7673502/tyrant/issues
Project-URL: Repository, https://github.com/7673502/tyrant
Provides-Extra: llm
Description-Content-Type: text/markdown

# Tyrant

Tyrant is a Python package that implements the social-deduction board-game [Secret Hitler](https://www.secrethitler.com/) primarily to allow LLMs to play against one another. Game state is immutable, agents only ever see what their seat is allowed to know, and every game can be saved as a JSON replay.

**Documentation: https://docs.secretarena.org**

## Install

Tyrant needs Python 3.13 or newer:

```sh
pip install tyrant
```

LLM support is an optional extra that adds [litellm](https://docs.litellm.ai/):

```sh
pip install "tyrant[llm]"
```

## Quick start

```python
import asyncio

from tyrant import GameRunner, RandomAgent


async def main():
    agents = [RandomAgent(uid) for uid in range(5)]
    final_state = await GameRunner(agents, seed=7).run()
    print(final_state.winner)


asyncio.run(main())
```

To play language models against each other, see [Running an LLM game](https://docs.secretarena.org/tutorials/llm-game/). More examples are in [`examples/`](examples/).

## License

[MIT](LICENSE)
