Live data from Hacker News

Street Fighter II's AI Engine

sf2platinum.wordpress.com

11–20 of 88 posts

Re: Street Fighter II's AI Engine

#11

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

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 instead, they will end up unhappy.

Re: Street Fighter II's AI Engine

#12
post #7

Earlier quoted context omitted.

They're fighting games. Why do we need to incorporate machine learning at all? If the computer wanted to they could always play perfectly because it could react to any input perfectly.

'learning to fight against you, sort of like a human would' is a lot more fun than 'literally cheating and perfectly countering you'

Since humans are not infallible, let's leave it at 'learning to fight against you, sort of like a superhuman would'.

It would make for a formidable opponent since you can still defeat it (with a good dose of luck).

Re: Street Fighter II's AI Engine

#13

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

They're fighting games. Why do we need to incorporate machine learning at all? If the computer wanted to they could always play perfectly because it could react to any input perfectly.

AI's are useful as training dummies. I believe Killer Instinct has quite a good AI called "Shadow Mode" that learns from your behaviour.

http://www.polygon.com/2015/5/30/8691219/killer-instinct-tea...

It probably uses a hybrid or AI and scripting techniques.

As for things like human reaction limits etc, that can built into the AI as part of parameters it needs to operate within.

Re: Street Fighter II's AI Engine

#14

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

They're fighting games. Why do we need to incorporate machine learning at all? If the computer wanted to they could always play perfectly because it could react to any input perfectly.

Well, that's the challenge, right ?

Not making an AI that has perfect response, but a "human-like" one.

Re: Street Fighter II's AI Engine

#15
post #8
post #4

Earlier quoted context omitted.

> Also cool to think about would be AI-vs-AI street fighter competitions. That's a fun idea. Provide an editor for the AI script files so you can program your own AI, then inject that into the ROM and pit AIs against each other.

You can do it using the techniques employed here: https://github.com/aikorea/strikersii_ai/tree/master/genetic Demo: https://www.youtube.com/watch?v=k6Ir8yd9iOk In terms of FGs, you would store the relevant game state as inputs and build a reward function around health, time, damage done etc. A relatively simple (and useful!) SFII AI would be one that tries to win by only using crouching medium kick, sweep and throw.

I just meant straight up using the scripting language described in the article to hand-code an AI.

Re: Street Fighter II's AI Engine

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

Re: Street Fighter II's AI Engine

#17
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?)

People have kind of tried this with Mugen, I think.

Re: Street Fighter II's AI Engine

#18
post #4
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.

> Also cool to think about would be AI-vs-AI street fighter competitions. That's a fun idea. Provide an editor for the AI script files so you can program your own AI, then inject that into the ROM and pit AIs against each other.

Not exactly the same, but: http://www.usgamer.net/articles/salty-bet-is-about-to-become...

Re: Street Fighter II's AI Engine

#19
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 which is jumping backwards when there's a specific distance between you. The computer would jump towards you, leaving them open to you jumping forwards with a kick. Every time. Just don't get caught in the corner.

Re: Street Fighter II's AI Engine

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

Exactly. That's why I've never enjoyed playing MK with a computer. Game AI should be about fun and enjoyment for the player.
Post reply on HN