Live data from Hacker News

Street Fighter II's AI Engine

sf2platinum.wordpress.com

81–88 of 88 posts

Re: Street Fighter II's AI Engine

#81

> 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 wouldn't go that far.

AIs in games often cheat, and they're also dumbed down so that they don't beat humans too fast, but the main difference with "regular" AI comes from the difference in goals and context. AI in most games has to make sufficiently smart decisions in a dynamic environment and with very limited timespan (milliseconds, usually). In such, it is pretty similar to algorithms used in robotics, and therefore entirely unlike the stuff the regular AI does to suggest you better ads.

Re: Street Fighter II's AI Engine

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

In this case I think it is an easy thing to implement. Currently the system seems to pick up any moves you do immediately, e.g. a fireball, and then chooses a script based on that + the extra factors.

One could just alter this process and insert a timed delay before this move becomes visible to the AI and it chooses a new yoke response.

You could also increase this time as AI skill goes down, although at e.g. 500ms it will begin to seem to a human as if the AI is dumb, reacting to things 250ms in the past. At this point you'd probably get a more playable and good looking AI by

1. adding more variance per delay, based on the skill level

2. having it fail a vision by inserting random moves into its perceived list (for example it think you're going to jump kick when you're only jumping)

3. by occasionally randomly deleting vision items, which will make it miss things that the player is doing

Re: Street Fighter II's AI Engine

#83
post #74

Earlier quoted context omitted.

Which in turn took from rogue. Which in turn came from DnD first edition / advanced edition, when DnD was more about navigating dungeon traps than fighting monsters (and not at all similar to modern DnD, which resembles Besthesda RPGs much more than roguelikes) But Original DnD is where my inspiration-knowledge stops

D&D is descended from wargaming.

And https://en.wikipedia.org/wiki/Kriegsspiel_(wargame) is a pretty old one.

Re: Street Fighter II's AI Engine

#86

I'm going to find Vega's script and replace it with NOOPs. I hated playing Vega. He would climb that wall like a spider and then jump with a shrill yell and then body-slam me. I think that's the most rage I've ever experienced in my life....just repeatedly getting beat by Vega. The only thing that comes close is getting hit by the blue shell in Mario Kart.

When he climbs on the fence, get as far away from him as possible. When he jumps off, jump away and hit roundhouse, this usually beats him.

Re: Street Fighter II's AI Engine

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

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

Similarly to that, there exist AIs for Starcraft Broodwar that are capable of providing a decent challenge to novice and intermediate level human players. You could check some examples at play on: http://sscaitournament.com/ and also develop your own AI in one of the more popular programming languages (C++, Java, etc). Disclaimer: I am the author of one of those Starcraft Broodwar AIs
Post reply on HN