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
  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.3b0.tar.gz (20.0 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.3b0-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyftg-2.3b0.tar.gz
  • Upload date:
  • Size: 20.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for pyftg-2.3b0.tar.gz
Algorithm Hash digest
SHA256 c4d780df1a15440ad2e220e9bbbb5b61b34b6b0cd41ebf934c73bdbc7f99d64f
MD5 c16a9034891f32928cb1c2c5bdd6a554
BLAKE2b-256 1bed4e5cdee74e54a34c5f2fb84e9ebd582fa3a95f217f0b18baf7d4f27beeed

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyftg-2.3b0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f733bd13a933e5653dc101ac6e32382128fb2f92ab94e19bb3a2e52293d4c64
MD5 df09d905721474dd7351b3f9c5ca3437
BLAKE2b-256 1ee024b70c5beed0932dbead6960df0d6b0f88d1748de2192c05980bd48407ba

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