Live data from Hacker News

Street Fighter II's AI Engine

sf2platinum.wordpress.com

51–60 of 88 posts

Re: Street Fighter II's AI Engine

#51
post #25
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.

The key to making an fighting game AI API interesting is enforcing the same reaction delays humans have, from decision making to input, which is roughly 250-300ms, if I remember correctly (your nervous system from brain to fingers has pretty high latency). That delay time is what well-made fighting games are designed and balanced around. If you forced the AI to create inputs that would get processed however many mill…

I was just contemplating a fighting game AI that actually had to use computer vision to process the game framebuffer and work off of what it can see as well.

Re: Street Fighter II's AI Engine

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

Re: Street Fighter II's AI Engine

#53
post #25

Earlier quoted context omitted.

The key to making an fighting game AI API interesting is enforcing the same reaction delays humans have, from decision making to input, which is roughly 250-300ms, if I remember correctly (your nervous system from brain to fingers has pretty high latency). That delay time is what well-made fighting games are designed and balanced around. If you forced the AI to create inputs that would get processed however many mill…

I was just contemplating a fighting game AI that actually had to use computer vision to process the game framebuffer and work off of what it can see as well.

Hasn't this been done already? IIRC there have been some machine learning AIs that use raw pixels as observations.

Re: Street Fighter II's AI Engine

#54
It's funny how much SF slang hints at you and your opponent being lackluster AI scripts:

- Downloaded: when you've identified your opponents patterns and know what they're going to do next. Ex. they always jump after they jab.

- Conditioning: when you've trained your opponent to react the same way consistently to something you do. Ex. they always jump when you throw a fireball because you've let them do it successfully.

- "time to guess": situations where, if executed correctly, your opponent must choose one defense from many defenses randomly. Ex. your jump trajectory is such that whether you end up on the left or right side of your opponent is determined by a pixel.

A phrase that novice players say a lot is "HOW DID HE KNOW?" because they're in shock that their opponent is "guessing" right every time when really their opponent just knows what the novice is going to do in every situation. What's impressive is that "every situation" is really the more skilled player abstracting over similar situations. Ex. they recognize kick->jump = punch->jump for their particular opponent. I don't think an AI will be able to make complicated abstractions like that on an offline game console for a while.

Re: Street Fighter II's AI Engine

#55
"When reacting to an attack the scripts are chosen based on something called a yoke. Each frame of animation for both avatars and projectiles contains a value for the yoke in the metadata, which the AI peeks at to select a script suitable for responding to that attack. The computer sees the yoke of your move as soon as you have input it, before the first animation frame has even displayed. As such it gets one more frame of advantage on top of your reaction time."

I KNEW IT!

Re: Street Fighter II's AI Engine

#56
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.

It depends. With a well balanced fighting game I don't mind losing to a good human opponent because it means that my game improves. Playing against someone who's good is a great way to find out what moves/patterns you thought might be safe aren't.

I agree that if you have no way to measure that progress/improvement then the fun is lost.

Re: Street Fighter II's AI Engine

#57

It's funny how much SF slang hints at you and your opponent being lackluster AI scripts: - Downloaded: when you've identified your opponents patterns and know what they're going to do next. Ex. they always jump after they jab. - Conditioning: when you've trained your opponent to react the same way consistently to something you do. Ex. they always jump when you throw a fireball because you've let them do it successful…

Yeah, Sirlin covers that really well in his Layers of Yomi on Playing to Win:

http://www.sirlin.net/ptw-book/7-spies-of-the-mind

Re: Street Fighter II's AI Engine

#58

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

Now i want though a machine learned fighting game AI. Maybe it would even be a challenge for the enthusiasts?

https://youtube.com/watch?v=xSGW7CwD5GM

Re: Street Fighter II's AI Engine

#59
post #58

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

Now i want though a machine learned fighting game AI. Maybe it would even be a challenge for the enthusiasts? https://youtube.com/watch?v=xSGW7CwD5GM

Someone made exactly that for Super Smash Bros.:

https://www.engadget.com/2017/02/26/super-smash-bros-ai-comp...

Re: Street Fighter II's AI Engine

#60
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.

> Most people do not find "fun" in losing.

Allow me to introduce you to a developer named https://en.wikipedia.org/wiki/FromSoftware ...

Post reply on HN