In this section I describes problems or bugs that I found. Some of them still remain in my code.
- Py_InitModule failsAI-TEM does not limit AI methods that it can be used with, because its concept is only "using an emulator as a game engine". Some AI methodology, however, requires extra functions. For example, using Genetic Algorithm requires running tests large amount of times, maybe hundreds or thousands generation. Therefore, an automatic result recorder is needed. High speed running mode will also be an additional welcome, for it can save time to train AI. High speed mode is already available in VBA and many other emulators. Not all games may allow us to provide an automatic running mode. This is because if we cannot find memory data address that tells us about the beginning and the end of the game, we cannot force the situation. But in general, automatic result collection can be done. Therefore, various AI techniques can be used.
If researchers are interested in FPS, RTS or NWN-like games, there are games that come with tools. Good testing environment for such games can be built with such tools. AI-TEM may not be the first choice for testing such games. If researchers are interested in simple platform action game, writing a game from scratch or finding some open source clone game is not a bad choice because all environments of the game can be fully controlled. However, developing games, from tools provided by a game, or from an open source clone cannot easily get us commercial-quality game. This is where AI-TEM can come in. AI-TEM can be used to test an AI developed on a simple, but fully controllable environment, against real commercial game. In the case of racing game it is difficult to know game state data such as opponent car position and the track situation. As a result, AI-TEM will not be appropriate. For fighting games we think that using AI-TEM is suitable, because it is rather difficult to make a fighting game and even more difficult to make it as good as commercial ones. Therefore, we think the tradeoff in the case of fighting game is worthwhile. For sports games, we think that it is still suitable to use AI-TEM, because of the same reason as fighting games. Even though there may be many game states that an AI module needs to know, finding them may be easier than creating a high quality sports game from scratch. Some AI researchers use Robocup simulation league as a testbed for their football AI research (Sean Luke 1997). However, Robocup simulation league rules are still not the same as real football rules. For other types of games, researchers have to consider the same factors as in this section.
To play a multiplayer mode in VBA (Link), two or more instances of emulators have to be used. Controlling many emulators at the same time while testing is not very convenient. With STZ3, when we want to test our script against the original AI, we have to use versus mode, that forces us to open another VBA instance. Otherwise we cannot select an opponent and difficulty level. The second instance is forced to run in window mode unnecessarily. It will be better if the second instance can run in the screen-off mode, in order to save CPU power. Sometimes two connected emulators do not synchronize. This may damage the automatic module in long run. Detecting game state of both VBAs becomes necessary. We can then reload the game again if they do not synchronize. Although there are some inconveniences, AI-TEM generally works. The emulator can be fixed to tackle the problem.
PC game trainer is a program used for editing states of a game that runs on PC. It searches state data of a game that is running and finds the right address to edit. It works just like Game State Observer module in our system. If researchers want to use it in AI-TEM, they will need to implement other modules to complete the testbed system.
An emulator is a software program that simulates the working of another software or hardware system
on another system. For example VeriLogger simulates the working of electronic transistors and logic gates on
PC. There are many mulators of console/handheld game hardware. VisualboyAdvance (VBA) and
isualboyAdvance Link (VBA Link) are GBA emulators. ePSXe is a PlayStation emulator. Even arcade machines
have MAME as their emulators.
ROM (Read Only Memory) is the game data dumped from the original game cartridge or disc. Using a game ROM with its emulator, a game can be simulated and played on PC.
Street Fighter Zero 3 on GBA
is a port version of original Street Fighter Zero 3 from the arcade machine. Its is regarded as one of the best
fighting games in the world. A player must select one character from many characters, and fight one on one with an opponent
character. A player must decide what action he will perform in many different situations based on his character
and opponent character’s status. An expert player will have knowledge about the timing of every action in the
game. Expert players also know about which special move will have which special effect. Therefore, the game
allows clear distinction between expert and novice players. It is also a game that has many ways to play, even
for the same character. Therefore, we believe this is a good game for tuning our testbed and for AI research.
More information about how to play Street Fighter Zero3 can be found at www.gamefaqs.com.
stz3 gba faqs
Plase see GBA ROM FAQ
(http://www.gameboy-advance.net/site/legal_info.htm)
The symptom was strange. When running the program and starting python, the program crashed. But this did not happen when running in debugging mode. After some (huge) attemps, I found that the cause of the problem was at Py_InitModule() function.
The m_stz3Method[] array must have its size equal to the number of interface function that you will initialize. You should also make an array that, when allocate its memory, its size must be devisible by 4.
This is because when loading or saving movie by VBA tools, the path of working changes to the path that is used when we load/save movie. So if python script is placed at another path (normally at same place as .exe), the progam will not run.
I found that using py script to press buttons, to make combos, (sensitive combo that must use very good timing) sometimes failed! I think this was because we commanded buttons using fixed timing, but sometimes the window for receiving input varied slightly, causing some button presses to be undetectible by the game.
More data is required to make a complete set of AIs. They are, each animation frame time, each animation attack range, each animation hit and unhit position (active and non active frames).
I always have problem when building program in release version. Sometimes it cannot be built or can but cannot run on another machine or requires another dll to run (mfc dll....) This time too, I face the problem again (very bored of this problem...) so I decide to release AI-TEM as a debug version first.