#game-theory #reinforcement-learning #player #model #theory #game #modeling

amfiteatr_classic

Implementation of some classic game theory problems to research on

7 releases (4 breaking)

0.5.0 Apr 9, 2024
0.4.1 Apr 2, 2024
0.3.0 Mar 11, 2024
0.2.1 Feb 7, 2024
0.1.0 Jan 15, 2024

#167 in Simulation

Download history 1/week @ 2024-02-04 42/week @ 2024-02-18 14/week @ 2024-02-25 2/week @ 2024-03-03 152/week @ 2024-03-10 4/week @ 2024-03-17 200/week @ 2024-03-31 112/week @ 2024-04-07

322 downloads per month

Custom license

365KB
6K SLoC

Amfiteatr

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


lib.rs:

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.

Dependencies

~12MB
~259K SLoC