Interface to existing flash-games for my own AI?
is there any way to access a flash game with a progam开发者_JS百科ming language (.NET prefered)?
I'm interested in AI and love having fun with genetic algorithms. I wondered, if I could write my own AI for some flash games, e.g. http://www.foddy.net/Athletics.html . For this game I simply would need a way to press the buttons and have the game state in some way delivered to my AI.
Is there some general interface or do I have to do it the raw way (analyzing screenshots and sending keystrokes to my browser)?
This all depends...
If you want to have a Flash app running in a browser communicating with a specialized server written in C#, then sure it's possible. Having said that, there isn't any way in Flash to construct your own packets, so you'll always have to deal with HTTP overhead. In most cases, unless you're doing all of your work via localhost, I'm sure that the traffic speed wouldn't suffice for anything complex.
If you want to have a Flash app running within your C# app, then the answer is no (AFAIK), unless you're willing to shell out a bunch of money for something like Scaleform.
If your intent is to implement AI algorithms and not have to worry about, say, low level rendering code, why not look at something like pygame? If that's not your intent, then ignore this part of my post ;)
精彩评论