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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyftg-2.1.1.tar.gz
  • Upload date:
  • Size: 23.9 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.1.tar.gz
Algorithm Hash digest
SHA256 7b73ebe41855154c9de4def1fe194869ffd8886e12c25df4c80649a36b670ef3
MD5 d7f1b42893d57f6fae3920f8401ef5ed
BLAKE2b-256 103a0e80636a815d0297680ac42bc5f58c8f193114212e3be5f96fab833a76f5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyftg-2.1.1-py3-none-any.whl
  • Upload date:
  • Size: 43.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b0f8338990b33d7b4af62814b68e6eac69f72bce9c5d23f8c9587ad351f2028b
MD5 c1d65d293c5e744d9a4c170457bde3fe
BLAKE2b-256 c2aeaa42e65df4e077616e4476b921a93ac49937ddc8873a8aa2edf9603de02f

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