Skip to main content

An interface for implementing python AI in DareFightingICE

Project description

pyftg

An interface for implementing python AI in DareFightingICE

First, install pyftg with pip.

pip install pyftg

Initiate Gateway for connecting to DareFightingICE platform.

from pyftg.socket.aio.gateway import Gateway
gateway = Gateway(port=31415)

Construct an agent and register it to gateway and then run the game by using following code.

agent1 = KickAI()
agent2 = DisplayInfo()
gateway.register_ai("KickAI", agent1)
gateway.register_ai("DisplayInfo", agent2)
await gateway.run_game(["ZEN", "ZEN"], ["KickAI", "DisplayInfo"], game_num)

After all the process are done, please also close the gateway.

await gateway.close()

Please refer to the examples provided in the examples directory for more information.

For developer only

Please refer to this link.

  1. Increase version number in pyproject.toml

  2. Build project

python -m build

if the above command doesn't work due to no module named build error, install build library then try again

pip install build
  1. Push project to pypi
twine upload dist/*

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

pyftg-2.3.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyftg-2.3-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

Details for the file pyftg-2.3.tar.gz.

File metadata

  • Download URL: pyftg-2.3.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pyftg-2.3.tar.gz
Algorithm Hash digest
SHA256 c0593a66939dbc5a20b43629065624d0f6ce4531ba78cc577888385089098dad
MD5 6f98bfc3a9a0001c066794cab6896df3
BLAKE2b-256 ccf3883701f396d19776c28c8d94fbf94fa87bed06931885b26c32f13aa89777

See more details on using hashes here.

File details

Details for the file pyftg-2.3-py3-none-any.whl.

File metadata

  • Download URL: pyftg-2.3-py3-none-any.whl
  • Upload date:
  • Size: 31.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pyftg-2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 375022330fc4395be4f09c9b3f4ec5adacb2ca0e969a65d81ff1e55b20505051
MD5 56bf2fcf0f0249f81bed959268e3065b
BLAKE2b-256 f1ed1b6f941b1cb68907f305f5878602f256ed78e63f050c697a2fed6159fec5

See more details on using hashes here.

Supported by

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