Skip to main content

A PettingZoo AECEnv implementation of the Fanorona board game.

Project description

Fanorona AEC Environment

PyPI v3.0.0 License: MIT Code style: black

  a b c d e f g h i
5 ●─●─●─●─●─●─●─●─●
  │╲│╱│╲│╱│╲│╱│╲│╱│
4 ●─●─●─●─●─●─●─●─●
  │╱│╲│╱│╲│╱│╲│╱│╲│
3 ●─○─●─○─·─●─○─●─○
  │╲│╱│╲│╱│╲│╱│╲│╱│
2 ○─○─○─○─○─○─○─○─○
  │╱│╲│╱│╲│╱│╲│╱│╲│
1 ○─○─○─○─○─○─○─○─○

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.

Installation

Using pip (recommended)

python -m pip install fanorona-aec

Local

git clone https://github.com/AbhijeetKrishnan/fanorona-aec.git
cd fanorona-aec
python -m pip install .

Usage

Setting up a basic environment

In a Python shell, run the following:

import fanorona_aec
env = fanorona_v3.env()

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

Testing

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

git clone https://github.com/AbhijeetKrishnan/fanorona-aec.git
cd fanorona-aec
python -m pip install .[dev]
pytest

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.0.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

fanorona_aec-3.0.0-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file fanorona-aec-3.0.0.tar.gz.

File metadata

  • Download URL: fanorona-aec-3.0.0.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for fanorona-aec-3.0.0.tar.gz
Algorithm Hash digest
SHA256 5a10a5d74759aa905be070673125e2482078633744187ecd680f7bc4de0d5069
MD5 8867b315bee006cf1d3afa8e16eb8252
BLAKE2b-256 5db94c5b5b944ef62a40aef176848e8b123f5dcf7d885f0aa1d23d2ea7867a7c

See more details on using hashes here.

File details

Details for the file fanorona_aec-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: fanorona_aec-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for fanorona_aec-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68c60f010a9ac80db38ad9208d24491152c16c6fe3772ea210725c4153af1b93
MD5 4ba4770be96e1fafda651e60cb17b2f4
BLAKE2b-256 87552917958f74a31f914c178c49ad5aff9893943766ed664fb4eaceaf288c2d

See more details on using hashes here.

Supported by

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