Jump to content

How does AI in Fighting Games work?


ScarfaceOne

Recommended Posts

OK, so I was playing Virtua Fighter on the computer today using an Emulator, and when I was playing against Lion, annoying as he is, he seemed to be waiting for me to blunder, so here is the question, how does Fighting Game AI work? Do Fighting Games as early as 1994 have Neural Network systems? Do they have Blunder Detection systems? Apparently in Fighting Game AI a Blunder is called an Outlier, but modern Chess Machines have a Blunder Detection system that can detect wherever a player has blundered, and when a player blunders, they look for a fork or something in the opening and use it as an advantage. So how does Fighting Game AI work? Are there different types? What is the most common type?

  • Brohoof 1

The only victim in graffiti is the architect. Graffiti is not a crime.

Link to comment
Share on other sites

I'm developer but only horror games. If you're talking about fighting AI and stuff, I don't know xD

They probably code it like this

 

findadvantages : script;

blunder : script;

 

if (player == blunder)

{

    enemy.findadvantages();

}

 

or something....

 

I haven't coded for almost 6 month so I'm totally blank xD

I don't know what I'm coding up there :P

Edited by Alanj2007Games

Check out my latest creation: Be A Tree (MLP In Real Life)

I've been a brony for nearly 2 years and I'm having a lot of fun being part of the community~ :D

 

Link to comment
Share on other sites

I've been wondering about AIs too, because I occasionally try to make games using game maker (my current project is a turn based game similar to civilization 1 - I've managed to make all of the mechanics work apart from the tech tree and unit stacking, which I haven't started yet), but I don't know how to make an AI to control the opposing players, so it's limited to a multiplayer hotseat game.

 

I've also considered making other games, including fighting games, but have not done so because I don't know how to make an AI for them.

Link to comment
Share on other sites

I'm developer but only horror games. If you're talking about fighting AI and stuff, I don't know xD

They probably code it like this

 

findadvantages : script;

blunder : script;

 

if (player == blunder)

{

    enemy.findadvantages();

}

 

or something....

 

I haven't coded for almost 6 month so I'm totally blank xD

I don't know what I'm coding up there :P

 

That sounds like it a little bit, but I think they use neural network systems, as in, each match is a generation, and it adapts to the players AI, a typical Virtua Fighter session(in the case of only winning) is 22 generations, so after 22 generations, the AI has learned from the player. But you see, I accidentally slowed down and punched in the air when Lion detected it and punched me back. The Algorithm might be.

 

If Fighter=Blunder

 

Find which=Blunder is correct, Blunder=X and X is either P(Punch),G(Guard),J(Jump or K(Kick), you also have to take into the equation the D-pad, there are millions of combinations to how a match can end though, so the AI probably has an adaptive system, I know on the saturn version of VF2 it certainly has. I've only just started a coding course at school, which involves block-based programming, and so I know a little bit about it. Like I said, modern chess systems have a Blunder Detection system. And use it to find an advantage against the player when he has a blunder.

Edited by ScarfaceOne

The only victim in graffiti is the architect. Graffiti is not a crime.

Link to comment
Share on other sites

The AI behavior in Fighting games is based on the difficulty you set, but in some modes, the difficulties are fixed and can't be changed. For Super Smash Bros, The AI behavior is based on the level you set for the CPU and difficulty for classic, all-star, and event match (wii-u only), but in Super smash bros for wii-u and 3DS, the difficulty for classic is based on the intensity which is like kid icarus: uprising's difficulty which is their intensity as well also the amiibo's AI behavior is based on their level, but their behavior can change based on how well it knows how to do the offensive, defense, execution, timing, throws, recoveries, and picking up items. My tips for super smash bros for wii-u and 3DS is that when you're playing against the CPU is that you wanna start fighting them at level 3 AI and then build up the level by 1 if you think you got the hang of the characters you're confident in playing with. If you think that if you're ready to go pro, set the CPUs to level 9 or you can fight against your amiibo if it's level 50 also note that if you're playing against a character that can counter like marth, ike, shulk, mii swordfighter, Lucario, Lucina, Peach, Greninja and Palutena, you wanna use your grabs & throws more often against them or when you think that they're about to counter your attacks and using Smash Attacks against these characters will KO you out with a counter.

Edited by KirbyFluttershy

NJDSJjA.jpg

Link to comment
Share on other sites

A lot of it is input reading I believe. It's how they can be so terribly reactive to what you do I guess. :wacko:

This is confirmed in some games. I don't remember which ones specifically but sometimes the AI is built around just making the fight as impossibly hard as they can.

 

Plus when it comes to older games they have less processing power to work with so I imagine they have to use simpler code so what they do and what they react to is written in a much less varied form than newer games.

Link to comment
Share on other sites

As you know AI is short for Artificial Intelligence. The goal of it in games, is to simulate another person playing against you.... In fighting games, there are only so many ways to move, and only so many usable button combos.... Depending on what difficulty setting you are on, the CPU fighter picks up on what moves you use the most, the least, and in what particular circumstances. And based on this information, will make moves its calculated as being the best for that situation..... If you notice, in fighting games, the final round is always the hardest, because the AI system knows how you are fighting that particular match.

A very good example of this, is in Mortal Kombat Trilogy, If you play against Sonya, Kano, or Kang, and jump towards that character alot, They will use a counter move (kano rolls up in a ball and strikes the jumping opponent, Sonya and kang to a jump kick thing). Or if you duck alot during a fight with Shao Kaun, he will spam moves that are impossible to block while ducking.

 

This is purely based on my own experience, and very minor technical knowledge on these subjects.

Edited by UnstoppableXD0001
Link to comment
Share on other sites

From what I can tell, it's basically input reading as well as just some basic patterns to do in certain situations. The AI will often pull off the same string of attacks when you are blocking and then just try an overhead attack if you're crouching or such. So it feels like they have a random set of things they can do for the average situation they'll be in.

 

For instance, when the player and AI are at opposite sides of the stage, the AI just decides to launch projectiles repeatedly. If you are a bit closer, he'll do either a midrange attack and dash in or airdash over to you and attack from the air. Close up, he'll basically try the same basic strings of attacks over and over again, mixing in throws and overheads. Oh and my personal favorite, at full screen range, if he has half his super meter filled, he'll launch a super that will go through all projectiles and counterhit you the moment you try a projectile attack. This was pretty much how Jin worked in Blazblue Chrono Phantasma at higher difficulties.

Link to comment
Share on other sites

A lot of it is input reading I believe. It's how they can be so terribly reactive to what you do I guess. :wacko:

 

Which is the same way Psycho Mantis evades you in MGS1, however, the Input Reading deliberately only reads Port 1. Not Port 2.

From what I can tell, it's basically input reading as well as just some basic patterns to do in certain situations. The AI will often pull off the same string of attacks when you are blocking and then just try an overhead attack if you're crouching or such. So it feels like they have a random set of things they can do for the average situation they'll be in.

 

For instance, when the player and AI are at opposite sides of the stage, the AI just decides to launch projectiles repeatedly. If you are a bit closer, he'll do either a midrange attack and dash in or airdash over to you and attack from the air. Close up, he'll basically try the same basic strings of attacks over and over again, mixing in throws and overheads. Oh and my personal favorite, at full screen range, if he has half his super meter filled, he'll launch a super that will go through all projectiles and counterhit you the moment you try a projectile attack. This was pretty much how Jin worked in Blazblue Chrono Phantasma at higher difficulties.

 

Well I was fighting against Kage(the ninja) in Virtua Fighter and as soon as I used Jacky's sweeping punch attack. Kage somehow already knew that I used it once per match, and when I did it again several times he immediately guarded, I think somehow it isn't just AI Reading, but it's over ''generations'', one match=one generation, it's how we evolve, generation 1, generation 2, generation 3 and so on. It will learn from it's mistakes and by a certain generation, would be almost perfect, however, this may not be the case. Input Reading is a possibility, but wouldn't it be great to make an adaptive AI like in VF2 that can read entire Input History? So like, they need to improve Ghost AI in Tekken 7 so that it can have a ''Drivatar'' style level of complexity. If there was an Arcade machine that read the entire inputs of players and had match logs, then it could make a fighter you would like to beat. I think in Tekken 7 the Ghost AI should earn money for you to spend on your character as well. Like I said, because of AI, there are millions of ways a battle can end. I still think there is a blunder detection system like in chess, where it detects potential blunders. I punched early against Lion Rafale(Arrogant little brat, his catchphrase is my Signature), and he knew that I blundered so he threw a move against me. modern chess systems can detect blunders and take advantage of it to find the best way to defeat it's opponent. However, AI lacks the raw creativity of humans, and always will do. I discovered a loophole around Lion as Kage and it was that I would perform an aerial move, then hit him on the side. Even 100 years later AI will lack raw creativity of Humans. Garry Kasparov only won a few matches of chess against Deep Blue because Deep Blue lacked creativity, then for some bizarre reason, it exploited a blunder in Kasparov and won. AI is good at exploiting blunders, but it's not good at raw creativity.

If anyone can do a Diagram of Fighting Game AI that would be very handy, thanks.

Edited by ScarfaceOne

The only victim in graffiti is the architect. Graffiti is not a crime.

Link to comment
Share on other sites

Well I was fighting against Kage(the ninja) in Virtua Fighter and as soon as I used Jacky's sweeping punch attack. Kage somehow already knew that I used it once per match, and when I did it again several times he immediately guarded, I think somehow it isn't just AI Reading, but it's over ''generations'', 

 

 You make it sound like the AI never blocks. I guess there must be something very special about this attack to where it's surprising for it to be blocked.

 

Being quite honest, I've played against an AI controlled opponent for hours straight on many occasions across many different fighting games, and they simply just don't learn. As for why they wouldn't use some form of learning AI, I don't know for sure. Maybe  it's to keep the difficulty static or maybe there's just not much to be gained from it.

Link to comment
Share on other sites

Maybe they just detect an opening in the players defence and go from that and if they are being attacked they guard based on the attacks being used.


img-31490-1-img-31490-1-sig-31490.sig-31You know. I was once 20% cooler. ONCE! It was pretty awesome... You should try it sometime :P.http://mlpforums.com/topic/123295-ask-nuclearburg-stuff-p/ ask me random stuff...

Signature made by Starlight Glimmer. Thanks a bunch!

Link to comment
Share on other sites

 You make it sound like the AI never blocks. I guess there must be something very special about this attack to where it's surprising for it to be blocked.

 

Being quite honest, I've played against an AI controlled opponent for hours straight on many occasions across many different fighting games, and they simply just don't learn. As for why they wouldn't use some form of learning AI, I don't know for sure. Maybe  it's to keep the difficulty static or maybe there's just not much to be gained from it.

 

No, he never blocked at the beginning of the match but then he learned that he didn't block Jacky's move, so the next time Jacky used his sweeping punch attack Kage blocked it. And I think the AI is designed to progressively get harder. I don't think Neural Network generations in VF were introduced until VF4. Tekken improves on it with ''Ghost'' AI.

Edited by ScarfaceOne

The only victim in graffiti is the architect. Graffiti is not a crime.

Link to comment
Share on other sites

No, he never blocked at the beginning of the match but then he learned that he didn't block Jacky's move, so the next time Jacky used his sweeping punch attack Kage blocked it. And I think the AI is designed to progressively get harder. I don't think Neural Network generations in VF were introduced until VF4. Tekken improves on it with ''Ghost'' AI.

 

I'm not convinced. That sounds more like a blind squirrel moment than anything. Yeah, Tekken had "ghost" AI, but treated it as a novelty in a seperate mode from what I remember. Don't think the same applied to their standard arcade mode  AI opponents.

Link to comment
Share on other sites

I'm not convinced. That sounds more like a blind squirrel moment than anything. Yeah, Tekken had "ghost" AI, but treated it as a novelty in a seperate mode from what I remember. Don't think the same applied to their standard arcade mode  AI opponents.

 

Arcade AI is different from Ghost AI, Ghost AI is only available in certain modes. VF2 on Saturn had generation based neural AI. And Ghost AI is also neural generation based. Also, I was able to use the sweeping move twice, but I still think that it can read inputs and learn inputs that match.


The only victim in graffiti is the architect. Graffiti is not a crime.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Join the herd!

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...