View
110
Download
1
Category
Preview:
Citation preview
The Contents of Analysis Tool
Makoto Ishihara
Agenda
About the replay file
About the Analysis Tool
About the Replay File
Contents of the Replay File (Overview)
Check index (-1)
P1’s max HP
P1’s character index Check index (-1)
P2’s max HP
P2’s character index
Frame information ・・・
Limit-HP mode
P1’s character index
P2’s character index
・・・
Time mode
・Max HP : max HP you set when
FightingICE is launched (e.g. 400)
・Character index:
‐ZEN: 0‐GARNET: 1
‐LUD: 2
‐KFM: 3
Frame information
Contents of the Replay File (Frame Information)
Frame Info. Type Explanation
isLeft Boolean Whether the character is on the left side of the opponent character
Action Remaining
FrameByte # of remaining frames of the action which the character is executing
Action Id Byte The index of the action the character is executing
HP Int The amount of the HP
Energy Int The amount of the energy
Coordinate of x and y IntThe x and y coordinates of the character box’s top-left corner when
isLeft is true; otherwise, the character box’s top-right corner
Key byte Byte The key of the action the character is executing represented in byte
An Overview of Action Id
The index of the action the character is executing
・・・
e.g.)
・NEUTRAL → 0
・AIR_A → 31
・STAND_D_DF_FC → 55
Range of Action Id : 0 ~ 55
An Overview of Key byte (1/2)
The contents of Key class
Key
class
Variables Key (Keyboard, P1) Key (Keyboard, P2)
A Z T
B X Y
C C U
U ↑ I
R → L
D ↓ K
L ← J
Key is down↓
True
An Overview of Key byte (2/2)
How to convert each key (boolean) to Key byte (byte)
𝐾𝑒𝑦 𝑏𝑦𝑡𝑒 = 𝑏𝑦𝑡𝑒
𝐶𝑜𝑛𝑣 𝐾𝑒𝑦. 𝐴 × 1
+𝐶𝑜𝑛𝑣 𝐾𝑒𝑦. 𝐵 × 2
+𝐶𝑜𝑛𝑣 𝐾𝑒𝑦. 𝐶 × 4
+𝐶𝑜𝑛𝑣 𝐾𝑒𝑦. 𝐷 × 8
+𝐶𝑜𝑛𝑣 𝐾𝑒𝑦. 𝐿 × 16
+𝐶𝑜𝑛𝑣 𝐾𝑒𝑦. 𝑅 × 32
+𝐶𝑜𝑛𝑣 𝐾𝑒𝑦. 𝑈 × 64
𝐶𝑜𝑛𝑣 𝑥 ∶𝑥 𝑖𝑠 𝑡𝑟𝑢𝑒 → 𝑟𝑒𝑡𝑢𝑟𝑛 0𝑥 𝑖𝑠 𝑓𝑎𝑙𝑠𝑒 → 𝑟𝑒𝑡𝑢𝑟𝑛 1
Range of Key byte: 0 ~ 127
Note that:
0 → All keys are true
127→ All keys are false
Contents of the Replay File (Reprint)
Check index (-1)
P1’s max HP
P1’s character index Check index (-1)
P2’s max HP
P2’s character index
Frame information ・・・
Limit-HP mode
P1’s character index
P2’s character index
Frame information ・・・
Time mode
・Max HP : max HP you set when
FTG was launched (e.g. 400)
・Character index:
‐ZEN: 0‐GARNET: 1
‐LUD: 2
‐KFM: 3
P1
Frame information
・・・
Front
Action Remaining Frame
Action Id
HP
Energy
x-coordinate
y-coordinate
Key byte
P2
Front
Action Remaining Frame
Action Id
HP
Energy
x-coordinate
y-coordinate
Key byte
About the Analysis Tool
An Overview of Analysis Tool
Flow of the processing
1. Reads a replay file from the “replay” directory
2. Extracts game information from the replay file and analyzes it
3. Outputs the result of 2. to a csv file in the “result” directory
4. Loop 1. to 3. as long as there are files that have not been read yet
Extraction of the Game Information (1/2)
Header Information
Game information
Replay file
Extracted and stored in local
variables (arrays)
-Action Id is converted to
the corresponding action name
-Key byte is converted to the
corresponding keys (if a key is
pressed: true; otherwise: false)
Analysis
-Up to the
user
Output
Limit HP mode
Time mode
Summary
Current version of the Analysis Tool
-Only extracts all frames’ information and outputs it to the file
You can add functions, class, etc… to analyze them for your AI
Recommended