Street Fighter II CPU AI
Reverse Engineered

I've reverse engineered the AI (and difficulty) system. A few interesting things to note: in 2P battles, the losing player is given an "advantage" in the second round; many things are randomized, including damage; the difficulty of the game increases steadily during rounds; the red hadouken is nothing but a palette swap and is triggered randomly; Vega's claw drop is random (after a point); damage is heavily metered towards the "end" of a match to make it last as long as possible with low "health bars." There is quite a bit of effort put into giving losing players an advantage to make matches seem as "close" as possible. I have the exact statistics for all of the randomness, if anyone is interested.

Is anyone else interested this information?

I ought to mention that all AI behavior is completely editable without bothering with assembly. For reference, I have the AI state machine for Guile completely decoded.

in 2P battles, the losing player is given an "advantage" in the second round; many things are randomized, including damage; the difficulty of the game increases steadily during rounds; the red hadouken is nothing but a palette swap and is triggered randomly; Vega's claw drop is random (after a point); damage is heavily metered towards the "end" of a match to make it last as long as possible with low "health bars."

That stuff is pretty interesting, I've always wondered about what really triggered Vega's claw and turns out it was pure luck. Thanks for sharing!

I'd really like to take a look at that. Do you have any documentation that you'd be willing to upload somewhere?

I have plenty of notes plus the commented code, but I'd need to spend some time making it into something that would make sense to someone who hasn't already spent hours with the engine.

I also have all of the player states documented along with the order of tests and the control flow. If anyone is thinking about making a fighting game, it might prove useful to take a peek at the architecture of the game that brought the genre to life.

Also documented is the entire format for the animations/attacks and parameters. It is rather interesting. For example, each frame of animation has 12 non-animation related parameters. Each frame in an attack frame sequence has an extra 10 parameters. Much of the player state is encoded directly in the animations themselves.

I know there's a partially-completed hack to enable the bosses for player selection, but it never got completed, and there's... problems.

For one, the game assumes they're normal characters, and have throws (only Vega and Bison do in WW, and NONE of the bosses have boss-vs-boss throw reaction schemes), and assigns special motions based on the character they're 'copying'.

Maybe your insights would lead to the first real WW boss hack...

Edit: Ooh! Another possible idea... maybe hack WW bosses into Hyper SF2? Assuming you can disassemble CPS2 as well as CPS1, of course.

damage is heavily metered towards the "end" of a match to make it last as long as possible with low "health bars.

Oh wow, this info explains loads.
I always did wonder why I'd always get my opponent's lifebar down to nearly zero, where you couldn't see it anymore but they weren't KO'd yet. It was fairly consistent, like every 1 in 5 or so matches, which always seemed a bit odd.