Live data from Hacker News

Street Fighter II's AI Engine

sf2platinum.wordpress.com

61–70 of 88 posts

Re: Street Fighter II's AI Engine

#61

That'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,…

Colin McRae Rally 2.0 was released back in 2000 and used offline learning to train a driving model. Here's an interview with the engineer that made it: http://www.ai-junkie.com/misc/hannan/hannan.html 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…

This is how Drivatar works in Forza Motorsport. It was first trained and tuned offline internally at Turn 10 to give opponents personality traits and driving style (Forza 2, ah, that damn M. Rossi!), then trained from the player as well and used offline (IIRC Forza 3 had AI progress vanish after the race while 4 persisted it across races. Anyway I loved how the opponents would ostensibly start to use my own tricks and lines against me, making each lap harder than the previous one), and finally starting with Forza 5 and 6 you could have your own AI that would play as you online with your own driving style while you were away, and if it was winning, you'd get some cash.

Re: Street Fighter II's AI Engine

#62
post #52

> 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…

Completely agree. Games are typically only "fun" when you feel challenged. Most people do not find "fun" in losing.

The thing is most simple game AI isn't challenging. Or it's challenging in boring ways. Like having 100% perfect aim or long health bars. It's awesome to have an AI that is challenging by actually being good at the game. Having some actual strategy and intelligence.

It's a complete misconception that "real AI" needs to be super hard. Give it realistic constraints like slow reaction times or noisy input. You can handicap it in many ways to control the difficulty. Modern chess engines can easily beat even the best players in the world. But by limiting the number of moves they search, you can set one up that new players can beat.

My favorite game AI is from age of empires 2. All other RTSes just let the AI cheat like crazy to provide challenge. For AoE2 they went to a lot of work to design an expert system and a custom scripting language for it. Tons of features were implemented to make it easy to write relatively sophisticated AI strategies. And they documented it well and made it easy for modders to write even better AI scripts.

As a result the AI on hardest can beat all but skilled competitive players without cheating at all (at least the current AI shipped with the steam version.) It's actually fun to play against and isn't a terrible substitute for a real human player.

Re: Street Fighter II's AI Engine

#63
post #23
post #3

I 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.

This is news to me. Interesting.

Re: Street Fighter II's AI Engine

#64

> 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 think the problem here is that AI academics think of AI as predicting from factors. Most other people think of an AI as a program that can effectivly emulate human intellegence. The end goal of AI (or at least game AI) is to create as perfect of a facsimile for the way an average person will think. In reality there are no "best decitions", let alone in a simulated reality inhabited with different rules and AI.

When I play a game I want the AI to be as close to another human as possible. That's why many AIs are laughed at for being tricked by really simple tactics (circling around a pilar so the AI follows you, putting something between you and the AI so they can't see you like in Skyrim's buckets, etc.).

Re: Street Fighter II's AI Engine

#65
post #52

Earlier quoted context omitted.

Completely agree. Games are typically only "fun" when you feel challenged. Most people do not find "fun" in losing.

> Most people do not find "fun" in losing. Allow me to introduce you to a developer named https://en.wikipedia.org/wiki/FromSoftware ...

And if that's not good enough, there's the one whose game basically opens with 'Losing is fun!': http://dwarffortresswiki.org/index.php/DF2014:Losing

Re: Street Fighter II's AI Engine

#66

Earlier quoted context omitted.

> Most people do not find "fun" in losing. Allow me to introduce you to a developer named https://en.wikipedia.org/wiki/FromSoftware ...

And if that's not good enough, there's the one whose game basically opens with 'Losing is fun!': http://dwarffortresswiki.org/index.php/DF2014:Losing

Both of which were influenced in their attitude towards losing by a little game known as Nethack [1].

Although I understand Souls doesn't have permadeath, therefore it's probably only half the fun of Nethack.

__________

[1] https://en.wikipedia.org/wiki/NetHack

Re: Street Fighter II's AI Engine

#67

> 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…

What do you mean by non-interruptible moves?

Re: Street Fighter II's AI Engine

#68
post #16

I 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?)

Mortal Kombat II effectively did this with really shitty AI. If you jumped towards an opponent, they would jump straight up and hit you with a projectile with perfect accuracy. Every time. It was impossible to throw a computer opponent because the AI had better timing then you. Every time. In fact, the only way to beat the computer opponent was to take advantage of weaknesses in the AI script, the biggest one of whic…

They also would let you leg sweep a lot more than a normal player would. I'd win whole rounds with just leg sweeps. Not the ideal kind of "fun" when playing a video game, but neither is getting perfectly, precisely owned every single time you jump.

Re: Street Fighter II's AI Engine

#69
post #16

I 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?)

Mortal Kombat II effectively did this with really shitty AI. If you jumped towards an opponent, they would jump straight up and hit you with a projectile with perfect accuracy. Every time. It was impossible to throw a computer opponent because the AI had better timing then you. Every time. In fact, the only way to beat the computer opponent was to take advantage of weaknesses in the AI script, the biggest one of whic…

There's a "bug" in the MK2 script I've never quite understood nor seen explained. Sometimes when jumping at the computer from a certain distance (and perhaps certain difficulty level) it will move back and will keep moving back trying to separate itself from you as long as you press no button. You can walk it into the edge and will stay there, forever trying to move back. Then you could move back yourself, wait a second, and it would throw a projectile, letting you jump in over the projectile for a corner combo.

Yeah, the MK2 AI isn't much fun. It's designed to eat quarters, not to provide a fair fight. :-/

Post reply on HN