• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

So uh, how does fighting game AI work?

I picked up SF:AC today, and it brings to mind a question that I've always wondered... how does fighting game AI work? I know that VF reads button inputs or some shit, and I've read that the challenge for developers is to make the AI NOT beat you every time. How does selectable difficulty work, without changing the damage done by attacks? This shit blows my mind.
 

Razoric

Banned
My guess is there are some random statements in the AI. the harder it gets, the less randomness and more precision
 

MoxManiac

Member
If it works similar to programming ai in MUGEN, the AI also chooses paticular actions on certain situations.

Some examples, if the player is in attack state, it might make the CPU guard (if trigger = playermovetype = True, CPU goes into guard state) Or if the player is x pixels away, it might trigger the CPU to dash forward. Or if the opponent is in range to throw the player, it performs a throw (trigger = Player distance is x or fewer pixels away and isn't in hitstun = True) Obviously it's usually more complicated than that, but it's the basic gist. Also, I'm sure Capcom/SNK randomize it so they don't always do the same thing.

I think some ai actually reads the player's command input, too. That's how they have almost pyschic reactions to whatever you do. They read that you press, say fierce punch, and triggers them to counter it, if they are in range.
 
Anybody remember the AI in Cyborg Justice?

It wasn't random at all. I could make those enemies do exactly what I wanted them to. If you pulled off their arm, and then dropped in at you feet, they always walk up to you and stop to pick it up. Of couse that always lead to me popping off their torso.

I played that game too much.
 
belgurdo said:
Explain early AI gaffes like charge moves with no charge time, et al

Easy- they don't simulate the control scheme; just the results from it.

ie, the AI won't be told to do "down, forward, punch", it'll just say "Hadouken".
 

LakeEarth

Member
Mister Zimbu said:
Easy- they don't simulate the control scheme; just the results from it.

ie, the AI won't be told to do "down, forward, punch", it'll just say "Hadouken".

Yeah, which leads to the CPU doing charge moves without charging. Always 'fun' to see Blanka walk towards you and then suddenly do a roll, or Guile throwing 2 Sonic Booms in succession.
 

Matlock

Banned
If opponent=human
Then result=kill

LakeEarth said:
Yeah, which leads to the CPU doing charge moves without charging. Always 'fun' to see Blanka walk towards you and then suddenly do a roll, or Guile throwing 2 Sonic Booms in succession.

Or seeing an entire round of rapid fire hadokens from Ryu. Ugh.
 

fugimax

Member
I would hardly call *anything* in a fighting game A.I. In fact, I can't think of any games that have A.I. in the true spirit of the term. Most games end up using scripted paths and reactant behaviors.

You'll know A.I. in a game when stuff you don't expect starts happening. Like a monster retreating to regen, or monsters finding each other in the halls and deciding to group together, or split up to explore other hallways. This is more FPS related than anything, but there is *so* much room for A.I. implementation in games and it just hasn't yet been done. Next-gen hopefully. :)
 
As a side note, isn't Street Fighter - The animated movie supposed to be on the SF:AC disc? I booted it up for a single round on my lunch break, and I didn't see that shit anywhere in the menus...
 

RiZ III

Member
I did AI for a fighting game I made as a project last year. It was a lot harder than I expected. Artificial intelligence is easy to program, artificial stupidity on the other hand..
 

Drey1082

Member
Go Go Ackman! said:
As a side note, isn't Street Fighter - The animated movie supposed to be on the SF:AC disc? I booted it up for a single round on my lunch break, and I didn't see that shit anywhere in the menus...

it's in the hyper version's option menu if i remember correctly.
 

3phemeral

Member
MoxManiac said:
If it works similar to programming ai in MUGEN, the AI also chooses paticular actions on certain situations.

Some examples, if the player is in attack state, it might make the CPU guard (if trigger = playermovetype = True, CPU goes into guard state) Or if the player is x pixels away, it might trigger the CPU to dash forward. Or if the opponent is in range to throw the player, it performs a throw (trigger = Player distance is x or fewer pixels away and isn't in hitstun = True) Obviously it's usually more complicated than that, but it's the basic gist. Also, I'm sure Capcom/SNK randomize it so they don't always do the same thing.

I think some ai actually reads the player's command input, too. That's how they have almost pyschic reactions to whatever you do. They read that you press, say fierce punch, and triggers them to counter it, if they are in range.

I'm not entirely sure about how AI is implemented for fighting games, but I assume that in theory, this would be the most likely scenario.
 
Top Bottom