Skip to content
Official gym API for game FightingICE.
Branch: master
Clone or download
Pull request Compare This branch is 5 commits ahead, 1 commit behind myt1996:master.
Type Name Latest commit message Commit time
Failed to load latest commit information.
gym_fightingice add isControl to Jun 27, 2019
.gitignore Init May 9, 2019 modify the readme file. Jun 26, 2019 Init May 9, 2019


Official gym API for game FightingICE for ver. 4.40 or later.

See for more information about FightingICE and the AI Competition.

4 envs can be used:


In the above first two envs whose names contain "Data", a vector of game data with a delay of 15 frames is returned for obs (the state variables).
In the above last two envs whose names contain "Display", an ndarray with no frame delay is returned for obs, but FightingICE will run slower in this mode.
In the above second and fourth envs whose names contain "Frameskip", after an env.step(action) is called, obs at the timing when the AI can execute the next action.

In addition to the above four envs, another env called FightingiceEnv_TwoPlayer is available that can be used to play a game between two gym-fightingice AIs. You can use this env to test the performance when you have two AIs developed in gym API.


gym to make env. Simply run

$ pip install gym

Or see gym official and github for more information.

Java and py4j: to run the FightingICE Java version, please install Java by yourself; for py4j, run

$ pip install py4j

port_for: to select port automatically if needed, run

$ pip install port_for

opencv for python: to get obs if the "Display" mode is needed, run

$ pip install opencv-python


First, clone this repo and run the following command in the same path where "" is.

$ pip install -e .

Then, download FightingICE from and extract it. The "FTGx.xx" folder should be specified in java_env_path below.


Set java_env_path when calling gym.make(), for example:

env = gym.make("FightingiceDataNoFrameskip-v0", java_env_path="/home/your_user_name/FTG4.40")

or start your script in the FightingICE installed path or just change the defualt value in the source code.

Set the opponent AI when calling env.reset(), for example:


p2 can be an AI python class or a string for the name of an AI Java class. The AI Java class should be in a jar file and located in the lib folder under the FightingICE Java env.

You can’t perform that action at this time.