Skip to main content

An interface for implementing python AI in DareFightingICE

Project description

pyftg

An interface for implementing python AI in DareFightingICE

Note: Version 2.0 is the latest version compatible with the legacy FightingICE. Version 2.1 and later will only support DareFightingICE-Unity.

First, install pyftg with pip.

pip install pyftg

Initiate Gateway for connecting to DareFightingICE platform.

from pyftg.utils.gateway import get_async_gateway
gateway = get_async_gateway(port=50051)

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.

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.1.tar.gz (24.3 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.1-py3-none-any.whl (43.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyftg-2.1.tar.gz
  • Upload date:
  • Size: 24.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.14

File hashes

Hashes for pyftg-2.1.tar.gz
Algorithm Hash digest
SHA256 15f8cce413351cb39f411fc0f4d89fd11838e9e324587d2601800bcc2298cb12
MD5 bf16366ac4c76ae9c6937f5d3891f580
BLAKE2b-256 01f088929667cde2a901567a2c56269de215aa44a6c49837c0bc85a1c120fcfb

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyftg-2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c5d259562eb8e5a71af3a30baf936ba727f9294c4c6d93f459267a65c7368e0d
MD5 afda7f70c306ed65d284d731c49cceee
BLAKE2b-256 83bd6d01894012185763e70048166689dbe0d5f939abfc9b30728e35ae032fcf

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