Reputation: 2077
I'm trying to develop a machine learning system for playing Super Mario.
The application should decide which key(game control key) is to be pressed according to the current game state.Therefore,
Is this possible or should I need to implement my own game for this ?
Upvotes: 0
Views: 124
Reputation: 113
1) It can be done for Mario too. Given, you simulate the keystrokes to the game. If you are playing a Direct2D clone, then DirectInput scan codes would be needed. Check out SendInnput in MSDN.
2) Emulators save game states. Many are open source too. Check out their forum and you might get the answer you are looking for.
Upvotes: 0
Reputation: 8255
Given that you don't have access to the Super Mario Brothers source code, I'd say your best bet is to find an open source game platform game which is in a similar vein. Doing so would allow you to replace the user input portion of the code with your AI code, and you'd be able to expose any game state information you wanted to it.
There are other projects out there for AI competitions which are designed specifically for this kind of challenge - I did something similar myself in university for TORCS. TORCS is a racing car simulator for which you write an AI plugin, it provides certain state information about your car and it's position on the track and you then process that to provide input to the car controls.
Upvotes: 3