Sonic and Sega Retro Message Board: Street Fighter II CPU AI - Sonic and Sega Retro Message Board

Jump to content

Hey there, Guest!  (Log In · Register) Help
Loading News Feed...
 
Page 1 of 1

Street Fighter II CPU AI Reverse Engineered

#1 User is offline Dr. Ivo 

  Posted 14 September 2011 - 01:11 AM

  • Professional Reverse Engineer
  • Posts: 42
  • Joined: 04-February 04
  • Gender:Male
  • Location:Philadelphia, PA
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.
This post has been edited by Dr. Ivo: 14 September 2011 - 02:50 PM

#2 User is offline Steven M 

Posted 14 September 2011 - 10:42 AM

  • Posts: 394
  • Joined: 05-January 07
Working on a puzzle/fighting game and somewhat struggling with the AI aspects, so I'd appreciate this information.

#3 User is offline ICEknight 

Posted 14 September 2011 - 02:35 PM

  • Posts: 8846
  • Joined: 11-January 03
  • Gender:Male
  • Location:Spain
  • Wiki edits:18

View PostDr. Ivo, on 14 September 2011 - 01:11 AM, said:

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!

#4 User is offline Glitch 

Posted 14 September 2011 - 02:58 PM

  • Posts: 143
  • Joined: 22-September 08
  • Gender:Male
  • Project:Sonic 2 LD
  • Wiki edits:22
I'd really like to take a look at that. Do you have any documentation that you'd be willing to upload somewhere?

#5 User is offline Dr. Ivo 

Posted 14 September 2011 - 04:49 PM

  • Professional Reverse Engineer
  • Posts: 42
  • Joined: 04-February 04
  • Gender:Male
  • Location:Philadelphia, PA

View PostGlitch, on 14 September 2011 - 02:58 PM, said:

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.
This post has been edited by Dr. Ivo: 14 September 2011 - 04:53 PM

#6 User is offline Cooljerk 

Posted 15 September 2011 - 01:26 AM

  • Lawnmower Man Embodied
  • Posts: 3201
  • Joined: 06-April 06
  • Gender:Male
  • Wiki edits:9
I'd love to read this.

#7 User is offline flamewing 

Posted 15 September 2011 - 10:37 AM

  • Elite Hacker
  • Posts: 692
  • Joined: 11-October 10
  • Gender:Male
  • Location:Brasil
  • Project:Sonic Classic Heroes; Sonic 2 Special Stage Editor; Sonic 3&K Heroes (on hold)
  • Wiki edits:12
I would also love to read this. And I will submit that folks over at TasVideos working on SF2 TASes might also find this supremely useful.

#8 User is offline Tiberious 

Posted 15 September 2011 - 02:51 PM

  • Yeah, I'm furry. Got a problem?
  • Posts: 552
  • Joined: 18-August 03
  • Wiki edits:1
I'm assuming this is for World Warrior?

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.
This post has been edited by Tiberious: 15 September 2011 - 02:52 PM

#9 User is offline LOst 

Posted 22 September 2011 - 04:43 AM

  • Sonic 2 HD - Lead Programmer
  • Posts: 4877
  • Joined: 10-January 03
  • Gender:Male
  • Wiki edits:2

View PostDr. Ivo, on 14 September 2011 - 01:11 AM, said:

many things are randomized, including damage.


I am interested in the randomizer. It is such a big part in a game's mechanics. I wouldn't be surprised if I have seen that randomizer before as I have worked with a derived Capcom game in the past.


Good stuff!

#10 User is offline Cooljerk 

Posted 27 September 2011 - 11:03 AM

  • Lawnmower Man Embodied
  • Posts: 3201
  • Joined: 06-April 06
  • Gender:Male
  • Wiki edits:9
Any chance of a follow up on this thread?

#11 User is offline null1024 

Posted 29 September 2011 - 09:21 PM

  • Posts: 122
  • Joined: 16-October 08
  • Gender:Male
  • Wiki edits:1

Quote

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.

#12 User is offline grap3fruitman 

Posted 30 September 2011 - 08:54 PM

  • Posts: 2931
  • Joined: 19-February 08
  • Gender:Male
  • Wiki edits:5
Are you going to share this on SRK? I'm sure they would be very interested in the information.

Page 1 of 1
    Locked
    Locked Forum

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users