In this section, source code of our research and research paper are provided.
Real-time Imitation Based Learning for Commercial Fighting Games, A research paper on Adaptive Ghost AI.
NOTE: Equation in this paper should be changed into Pa = Pw + C x (Pf - Pw). From further experimentation, it gave better result for the AI.
Source code for AGAI: AGAI
Source code for AAI: AAI
NOTE: Source codes in these projects consist of three parts:
• the VBA part (written by the VBA team)
• AI-TEM and Ghost AI
• AGAI and AAI
Our apology for bad code structure. Please feel free to rewrite any part of the program.
Instruction on how to use the project AGAI and AAI.
Project AGAI and AAI can be open using Microsoft Visual Studio 2008. Open file gba.sln in directory Project\VisualBoyAdvance-1.7.2\win32.
After building the project, open two instances of VisualBoyAdvance.exe. As we will test the AI with a human player, this requires a two-player mode. The second instance of VBA will act as another GBA machine, enabling the two-player option.
Configure the attributes of the two VBAs (such as video size, sound, joypad key) as you require. The frame skip option of the first instance of VBA must be set to 0.
Open Street Fighter Zero 3 upper on both VBAs and enter VS MODE.
The first instance of VBA is shown on the left and the second on the right.
Wait for the game to enter the VS mode.
You will arrive at a character selection screen. Player can now focus on the first instance VBA's screen. Leave the second instance of VBA open.
We will use the first instance of VBA to test the AI.
AGAI
Select MyAI in the menu of the first VBA instance and select StartDynamicScript to enable the AI.
Select character "RYU" for player 1 and player 2. (We only developed AI for testing with the character RYU.)
Other attributes such as MODE and ISM are set to their default values. Choose any stage you want. You can also alter VITAL (a character’s life). For AI test, it is recommended that VITAL be set to FULL to allow longer learning period.
Play the game and observe the AI.
To stop the AI, select MyAI from menu and select StopMyAI.
The program generates a file containing information of the game and characters such as points that both sides score in the match and remaining life. You can reprogram it to collect information that you want.
AAI
After opening the game, select MyAI in the menu of the first VBA instance.
Enable option NoDefaultGuard and NoMoving.
Enter VS MODE using two instances of VBA, similar to what you do when running AGAI's setup.
When in character selection screen, select StartDynamicScript from MyAI menu and select character "RYU" for both sides.
Play the game and observe the AI.
To stop the AI, select MyAI from menu and select StopMyAI.
Collect the file containing play information after required numbers of matches are played.