Computer opponents “cheating” in games is nothing new. Though the bonuses an AI player gets are more to address the fact it can’t think outside the box like a human can, rather than an attempt to smash you senseless every time. The bits and bytes of Street Fighter 2‘s brains were no different, relying one a single-frame advantage to get ahead of competent, flesh-and-blood combatants.
SF2 Platinum is an attempt to reverse engineering Street Fighter 2 and code it from the ground-up for modern systems, using a combination of C and OpenGL. Here’s a sneak peek.
As the developer has worked through the innards of SF2‘s logic, he or she has made some interesting discoveries. For example, a recent blog post on the project’s site details how the game’s artificial intelligence worked:
Moves made by computer opponents are not made independently but are instead grouped into small scripts, written in a bytecode similar to machine language. A computer avatar has a repertoire of different scripts for each opponent they could face in the game, and set of circumstances, such as a nearby fireball. Instructions in the scripts can command the avatar to execute an attack (punch/kick/special/throw), walk or jump somewhere, and wait — either for a timer, or some condition such as the ability to throw another fireball.
The post goes on to mention that the instructions could go so far as to have “primitive IF…END blocks” so opponents could be flexible based on the player’s actions (or lack thereof):
Here’s one of Ryu’s typical ‘easy’ attack routines: Throw three fireballs at you, and if you’re somehow silly enough to catch all three and get dizzy, run up to you and throw you.
But this doesn’t answer the question about how SF2 cheats. The main way is reading your mind… sort of. When the player inputs a button press or joystick movement, the game uses that information to help the AI make its next move… before your character does:
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.
It also cheats in more obvious ways:
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.
Hit up SF2 Platinum’s post below for even more details. There’s some more technical stuff in there, but as you can see from the snippets above, a lot of it is easy to understand.
The AI Engine [SF2Platinum]
Comments
14 responses to “Just How Badly Did Street Fighter 2’s AI Cheat?”
Why not just say “they” if you don’t know the gender of the dev?
Although in this situation it’d be, “they’ve made some…”
Maybe to quickly acknowledge that the developer is unknown and presumably an individual rather than a team
Indeed. ‘They’ and ‘them’ typically refer to multiple people, only in recent years have they started being used for singular pronouns. Generally it’s up to the author or publishing house’s discretion to choose how to refer to an ungendered subject.
As such, both what Logan Booker has written and what pointzeroone has suggested, are correct usage.
With the exception that “recent years” is closer to a number of decades.
While they’re both correct, I read Logan’s formulation as irregular because of the ubiquitous use and understanding of singular they in contemporary writing.
It’s a persnickety point to snag.
There’s evidence of people using singular “they” for centuries. It isn’t recent at all:
https://en.wikipedia.org/wiki/Singular_they#Older_usage
The problem with using “they” is that it’s ambiguous as to the number of people and the gender of the person/people. As a grammar function, it’s useful to be ambiguous about one or the other, but being ambiguous about both at once causes weird issues with parsing the sentence as a reader.
This is why people have been trying to get a gender neutral singular pronoun like “zey” to be picked up for years. It refines the language.
The only AI that pissed me off in SF2 was how much more damage the AI would deal with each hit on the later stages, rather than make a smarter AI they just made one that dealt more damage.
The only exception to this was the Akuma fight in Super SF2 Turbo, thats just amazing to watch.
Sometimes the chests were very obvious. I remember in sf2 days some character light crouching kicks lasted only 1 frame or 2. So if ur fingers were fast enough u could get in 5 or more light attacks in a row (essentially a combo). Then this one time the AI caught me in one of these combos but I think he linked 15 or more attacks until I got dizzy!
I always knew Guile cheated, along with Bison. Any AI with a charge move was able to cheat. You learned to curse it pretty quickly.
I always felt Tekken games were similar when it came to reading human player input: your AI opponent knew what move you were doing as soon as you made the input. You could tell this on older Tekken games (I haven’t played the last couple) by standing far away and mixing up high & low shots. The AI opponent would crouch or stand to block accordingly across the screen and never miss a beat.
So at the hardest level you had to bait/feint the AI to make an opening to counter. This limited the range of techniques and combos which were useful against AI, many of which would still be useful to mix up against a human opponent who can’t read your mind. So constantly playing Tekken at the hardest setting could stunt your skill level against humans, IMHO.
Also, those motherfuckers skip frames. I’m sure of it.
There has always been that feeling of being cheated by AI opponents. It was tolerable up until a boss stepped out with the addition of ridiculously over-powered moves.
Understandable that devs get creative with AI that is engaging and fun – for the most part many games still felt challenging even with the spectre of shenanigans. I can only remember a few games where the AI was indomitable.
Input reading has always been a basic staple of Fighting game AI. I love “Anime fighters” but the AI in those is always designed to be cheap with its cheats. Especially bosses which always have a lot of the rules around super moves and recovery times removed.
I always felt like the A.I. in SF2 cheated if I was playing with enough difficulty stars. For me though, the master cheat was the original Super Mario Kart. I can barely play that game any more, because I get so angry at the stupid computer characters cheating, using special items whenever the hell they want. Pity help you if Mario or Luigi are selected to be your rival and they just spam invincibility to hit the front of the race every time.
Hahah I remember in the latest stages of difficulty the AI connected special techniques so quickly that the names couldn’t finish in time and got mixed. Ryu was like “HadouHadouHadosumakisenpuoryuken!” when you were foolish enough to try to avoid the three almost simultaneous Hadoukens by jumping forward.
Interesting info. I always wondered about this. So when me and my brother would curse the cpu, on 8-stars difficulty no less, as being a “cheating ****”, we weren’t wrong….