Skip to main content

A PettingZoo AECEnv implementation of the Fanorona board game.

Project description

Fanorona AEC Environment

PyPI v3.0.2 License: MIT Code style: black pre-commit

  A B C D E F G H I
5 ●─●─●─●─●─●─●─●─●
4 ●─●─●─●─●─●─●─●─●
3 ●─○─●─.─○─.─○─●─○
2 ○─○─○─○─○─○─○─○─○
1 ○─○─○─○─○─○─○─○─○

W to play
Last capture: E3 E
Visited: D3, E3
Half-moves: 0

This is an implementation of the Fanorona board game as a PettingZoo AEC game. The rules have been sourced from here. An additional rule where games exceeding $44$ moves end in a draw has been implemented, since the original rules do not have explicit draw conditions.


Using pip (recommended)

python -m pip install fanorona-aec


git clone
cd fanorona-aec
python -m pip install .


Setting up a basic environment

In a Python shell, run the following:

from fanorona_aec import fanorona_v3
env = fanorona_v3.env()

See for a script that implements a simple random policy to interact with the environment.


We use pytest for tests. You can run them via:

git clone
cd fanorona-aec
python -m pip install .[dev]

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fanorona-aec-3.0.2.tar.gz (19.6 kB view hashes)

Uploaded Source

Built Distribution

fanorona_aec-3.0.2-py3-none-any.whl (16.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page