#game #theory #model #player


Implementation of some classic game theory problems to research on

3 unstable releases

0.2.1 Feb 7, 2024
0.2.0 Feb 7, 2024
0.1.0 Jan 15, 2024

#155 in Simulation

Download history 25/week @ 2024-01-14 8/week @ 2024-01-28 52/week @ 2024-02-04 30/week @ 2024-02-11 117/week @ 2024-02-18

207 downloads per month

Custom license



Framework to model game theory problems and apply reinforcement learning to optimise solution. It is designed to help model problems involving many players. This is rather low level modelling framework and in many cases Python equivalent would be more handy however this one maybe helpful if you want Rust compiler to help you develop liable code.

Member crates:

  1. amfiteatr_core (github) - crate for core traits and generic implementations without reinforcement learning.
  2. amfiteatr_rl (github) - crate extending core features to provide interface and simple implementations of reinforcement learning (using neural networks backed by Torch (tch)).
  3. amfiteatr_net_ext (github) - currently providing early proof of concept for using TCP socket to provide communications between entities in game model
  4. amfiteatr_classic (github) - crate providing structures for simulating classic game theory games (like prisoners' dilemma).
  5. amfiteatr_examples - repository with some examples of using the library. Hopefully it will be expanded in the future.

Other projects:

Currently, I develop some projects using this library, that can show current possibilities

  1. brydz_model - Simulation and reinforcement learning model for contract bridge card game. Can be used as example of implementing 4 player game.
  2. brydz_dd - early project of Double Dummy solver for contract bridge (card faced up analysis of optimal game solution). Warning it uses alpha-beta algorithm variants and on current level of optimisation it cannot be used to solve full 52 card problems.

Development stage

It is my education and research project. Many elements will change or vanish in the future and some breaking changes may occur often. I will be adding features and documentation in time and I will try to simplify interfaces that currently seems to be inconvenient.

TL;DR It's early and unstable stage.

Licence: MIT


This crate provides minimal infrastructure to deal with classical game theory problems such as:

  1. Prisoners' dilemma (or any other game represented in 2x2 grid)
  2. Replicator dynamic problem based on games represented in 2x2 grid.


~247K SLoC