> Anyone looking for some insight into how to write an AI engine for a game today will be disappointed. And yet, it was really effective and fun. This is like a magician revealing how a trick was done, it's always a "letdown".
Street Fighter II's AI Engine
41–50 of 88 posts
Re: Street Fighter II's AI Engine
#42> These days, when most people talk about AI they’re talking about machine learning. There’s not any of that in SF2. Actually, AI for games is pretty much never equivalent to AI for non-games. The end goal is different - games want to provide a non-optimal set of instructions, so that it's challenging but not impossible to win. The goals are entirely different. If you're making a game, this is probably at least a use…
I bet this was done to decrease the complexity of the script flow. Otherwise, you'd have to provide for the interruption cases.
Re: Street Fighter II's AI Engine
#43That's pretty fun, thanks for sharing ;) Actually with a machine learning approach it's not immediately obvious to me how to incorporate it. I suppose an RNN or reinforcement learning could be used, in principle, to learn good reactions to a given sequence from the opponent, but it would take so many failures to train it, which would have to be generated more or less manually. I don't see how it could be done easily,…
There have been some attempts to apply ML to NPC control: sometimes to learn how to beat the player, sometimes how to mimic them (Forza), sometimes to learn what player wants done and assist them (B&W). But none of them have crossed the chasm from novelty to killer app. The main difficulty with combat AI is that players enjoy mastering a game and beating it. And if the game keeps getting better and beating them inste…
I really suspect that ML will find its place in helping design machines that are then static, but ML that adapts as we use it will be frustrating to work with. At least until we develop, as a society, some kind of "theory of mind" of AI, where we learn how to expect a machine to adapt as we use it. But we are not there yet.
For now, machines are still better when they act like machines. That is why I think, for example, society adapting to the presence of things like ubiquity of self-driving cars is going to be a long and scary road.
As for video games, it seems like a computer-controlled character should be somewhat predictable, even if complicated. When the ML algorithms adapt, it should present a new character to fight, not adapt an existing one that the player has already "theorized" (i.e. figured out its pattern.)
Re: Street Fighter II's AI Engine
#44That's pretty fun, thanks for sharing ;) Actually with a machine learning approach it's not immediately obvious to me how to incorporate it. I suppose an RNN or reinforcement learning could be used, in principle, to learn good reactions to a given sequence from the opponent, but it would take so many failures to train it, which would have to be generated more or less manually. I don't see how it could be done easily,…
In this modern day and age grabbing telemetry from multiplayer matches might be a good way of getting training data. Particularly for games that already measure player skill. For example creating AI for Hearthstone that played like each of the skill tiers. Periodic retraining on up to date data could then keep up with things like changes in the metagame.
Re: Street Fighter II's AI Engine
#45I wonder if one can create an invincible AI for Street Fighter II. One that obviously makes the right choice always and can counter every possible human attack. (kind of think that it was also possible even back in the 90s, but never implemented; what would have been the point?)
I've figured out that if Blanca jumps straight up and does a hard kick when zangief gets close, there is literally no way for zangief to hit Blanca. You can do this on the hardest difficulty and beat zangief perfectly.
This presents a problem for a perfect AI. The perfect AI would need to know not to get so close to Blanca as Zangief and at best could only let the time run out during that matchup.
Re: Street Fighter II's AI Engine
#46I wonder if one can create an invincible AI for Street Fighter II. One that obviously makes the right choice always and can counter every possible human attack. (kind of think that it was also possible even back in the 90s, but never implemented; what would have been the point?)
One interesting thing about street fighter 2 is that all of a the character's basic moves are different. I've learned from playing street fighter 2 that one matchup has a sort of bug, Zangief vs Blanca. Zangief requires to be close up to hit someone. Blanca's hard kick in the air has a long reach. I've figured out that if Blanca jumps straight up and does a hard kick when zangief gets close, there is literally no way…
Re: Street Fighter II's AI Engine
#47"Charge moves such as blade kicks are simply executed as instructions, so they cannot fail. Guile can do a bladekick from a standing position simply because that’s what’s in the script." That's a pretty big cheat, to be honest.
I sort of neat trick is during a dump you can be holding down to charge your "blade kick"* and immediately when you hit the ground, press up and kick to execute the move, and it gives the appearance of one of performing the move without charging. Sometimes gets a surprised look by your opponent.
* we called it a flash kick, but whatever.
Re: Street Fighter II's AI Engine
#48I wonder if knowing the different strategies would make pro-humans better at playing the game. I feel like they might already have internalized the different strategies the computer uses, but still pretty surprising to see how simple the source code is. Also cool to think about would be AI-vs-AI street fighter competitions. Or SF AI that learns from live matches currently being played online.
> AI-vs-AI street fighter competitions http://www.saltybet.com/ does just that.
Re: Street Fighter II's AI Engine
#49> These days, when most people talk about AI they’re talking about machine learning. There’s not any of that in SF2. Actually, AI for games is pretty much never equivalent to AI for non-games. The end goal is different - games want to provide a non-optimal set of instructions, so that it's challenging but not impossible to win. The goals are entirely different. If you're making a game, this is probably at least a use…
(uninterruptible moves, for instance) I bet this was done to decrease the complexity of the script flow. Otherwise, you'd have to provide for the interruption cases.