Thoughts on Fighting Game AI

It’s no secret that computer opponents in fighting games tend to have easily manipulatable artificial intelligence. Considering that single-player mode is rarely a priority in fighting game design, it comes as no surprise that CPU AI would be so underdeveloped.

In fairness, constructing gameplan flowcharts that are both compelling and reasonably challenging is no easy task. Part of it is because optimized AI can be nearly impossible to beat in any primarily reaction-based game. SFA3 Akuma had this ridiculously dominant bully tactic where he’d tick with c.LK and then walk forward. If you do nothing, you get thrown. If you do anything, you get uppercutted.

It was the scariest throw mixup ever. He’d use this whimsically on every difficulty level without warning. Basically your only options were to reversal his throw attempt within the 4-frame window after he initiates his throw but before it connects. Or to press a button to bait his DP then kara-cancel into super. Not every character has a super that beats Shoto DP.

Of course, there’s nothing wrong with the tactic itself. Tick throw mixups are perfectly valid in competitive play. The problem is, Capcom replaced human anticipation and pattern recognition with sheer mechanical reaction speed. This removes the mental aspect from the equation, emphasizing execution alone.

It’s relatively easy come up with nearly insurmountable AI routines along these lines. Imagine fighting a CPU opponent that uppercuts on reaction between missed combos and non-airtight block strings. What would you do to counter it? You could kara-DP to get free damage after every blocked move, baiting the opponent’s reversal with the normal move and beating it with the slightly delayed DP.

ComboVid.com - Fighting Game Combos, Tutorials, Matches, Screenshots, and Strategy

To counter that, the AI could be programmed to check for success – to keep doing reversals as long as they work, then whenever one fails to connect, pass up five opportunities before trying again. You could adapt by figuring out the AI’s flowchart and kara-DP’ing one reversal, then keeping track of five blocked moves before kara-DP’ing again.

However, what happens if the AI randomizes the number of withheld reversal opportunities within a range of two to seven? You can’t simply kara-DP anymore because potentially it can be punished whenever the computer blocks. Nor can you rely on difficult links or imperfect block strings anymore, because you’ll sacrifice a varying amount of vitality every round. You can’t even play mindgames because it’s strictly random. Superior reaction time gives the CPU a huge advantage in certain areas of the game, allowing it to shut down several angles of attack. How do you cope with that?

Realistically speaking, limiting the CPU to “human reaction time” makes it almost impossible to code competitive AI. Even coding chess took ages plus tons of resources, and that’s a slow, turn-based board game. Not to mention, there’s way more written about chess strategy than fighting game strategy.

It will probably take a very long time to find any balance between these two extremes. Either the computer will be impossible to beat, or it’ll lose to laughably simple exploits which can be repeated forever without it learning anything. Will we ever see adaptive AI that remains challenging after extensive play and does more than teach bad habits?

33 thoughts on “Thoughts on Fighting Game AI

  1. N00b_Saib0t

    i heard some people say SF4 seth has “rubber band AI”, apparently some system set up that determines how you do against the rest of the opponents to determine final boss difficulty. if you wipe the floor with your opponents on easiest, you might as well be on hardest by the time you get to seth. i dont know how much truth there is to that, but i have noticed that i have an EASIER time against seth as characters i dont know as well because i couldnt rampage the computer as them (i suck as fuerte, but beat seth with ease. i’m moderately good as balrog and seth handed me my ass). it might be coincidental, but it seems plausible.

    also, maybe its because i suck, but i thought virtua fighter 4 evo had pretty solid AI. a good player might be able to exploit it, but i found it to be just challenging enough back in the day and actually enjoyed playing it by myself.

  2. error1

    AI Seth is easy to beat with any character. Crouch block just outside throw range and wait for him to lightning legs, he uses it like it’s safe and you can punish with anything. Many characters can also punish a blocked s.hp at close range

  3. Maj Post author

    Half of CPU Seth’s game is based on knocking you down, then starting a bullshit command grab / uppercut reactionary mixup after teleporting behind you. He even does that crap after a jump-in or wall jump. And he jumps over fireballs on reaction.

    If you’re beating him by jumping over his mid-range s.HP or blocking random lightning legs, you’re picking up bad habits because Seth players don’t do that crap.

  4. ShadowXSnake

    When I’m unlocking the characters I repeatedly play as Zangief, using lariat every time the CPU gets up (which perfects every round), then I just lose to Seth once and use a similarly brainless tactic using whichever character I need to use to unlock the next.

    And about that rubber band AI, I never noticed THAT, but I could swear that TAUNTING increases the CPU difficulty. One time I was on easiest, and the second to last stage pitted me against Dhalsim, and I taunted like 30 times the first round, and the second round he suddenly seemed godlike, then in the Seth fight I actually had to seriously focus on what I was doing, and I was really confused. Can anyone confirm or deny this? Because I thought that I had just completely phased out or something, but hearing that rubber band AI thing made me think…

  5. error1

    Trying to play cpu seth like a human seth player is pointless. For one thing cpu seth has more hp but also seth players have to play very safe as even one blocked legs or srk can cost them half there life. The wake-up game seth does just isn’t worth it for a human because the risk vs reward is too high.
    Out fire balling him is also very easy with ryu, sagat, gouken, and akuma when you get used to countering his wall jump

  6. Remxi

    I always thought the KoF2002 AI was done really well because it manages to be challenging without ever feeling like it just read your inputs and did a faster move to counter it. I also like it because it uses some of the strats and gimmicks used in high level play (instant overheads, meaty mixups, trading specials to juggle, tick throws etc.) and each character has a fairly unique playstyle.

  7. Baron Mercury

    Every Third Strike computer character except Gill can be knocked down and then shoryukened on wakeup as many times as you like, time it right and they will never block.
    Street Fighter 2 single player mode is nigh-impossible.

  8. Maj Post author

    Oldschool CPS1 Ryu is one of my favorites. He’s a lot more fleshed out than the rest of the cast and a lot more dynamic. He has a few dumb patterns too but you have to go out of your way to trigger them and you don’t have to exploit them to win.

    Otherwise i think if designers can’t make compelling AI, they should make it braindead easy instead. It’s so annoying when you’re at an arcade and nobody else is playing, so you want to test something. Except the CPU does nothing but stand there and block everything and uppercut every jump. So basically you’re forced to either counterpoke or win by block damage.

    Why is that shit necessary? It’s not like it’s difficult to win. So yeah, i think arcade fighting games need a “Just Give Up Bro” code in single-player mode.

  9. Twist

    It saddens me greatly that fighting game AI is so lame. Sure there’s always going to be limitations to playing the CPU, but there’s no reason that it couldn’t be a great teaching tool that punished bad habits instead of creating them.

    There’s also got to be a better way of mediating the difficulty other than making it braindead on easiest and cheap on hardest. In SF4 they seem to have decided that the hardest thing to cope with is constant offense, so that the game actually becomes easier on the hardest difficulty because you can guarantee that they’re going to attack into your back-to-back psychic DPs.

    Now that they have built the arcade fight request system into SF4 I think it’s more important than ever that they actually put some effort into making their AI worthwhile.

  10. jamheald

    Play as Vega and if you wall to the opposite side (so over the cpu) they uppercut you on the way up!

  11. jamheald

    Also sf4 cpu forgets Ultra startup time when trying to juggle, like Rufus, on hardest, will land a short follow up to a messiah then do ultra.

  12. Kikuichimonji

    @error1
    Seth is my main and the strongest part of my game is my mixups. The only characters I don’t attempt mixups on are Blanka and Zangief. When I alternate between crossups, non-crossup divekicks/headstomps, SPDs, empty jump low short, and frame trap DP FADC, it can be extremely hard to block or even reversal successfully. And then when I get a headstomp combo I get the left/right reset mixup which is even better.

    Watch OnlineTony play for an idea of how Seth can apply mixups in high-level play.

  13. Snoooootch

    Well, the video should be up on my

    <— Youtube

    in about 2 hours. It didn't come out as good as I wanted it, for I had worked on it yesterday for 4 hours, editing and stuff but had the misfortune of hitting the power button when I moved to the couch. I had to do it all over again today. I focused on the timing within the little frame of time you get to actually input the move at around the end of the Ultra move animation. One super input was as instant into the window as I could make it, and the other was delayed purposely in order to see any potential solutions to countering an Ultra. Ken was my subject, for his Ultra angle moves towards the enemy. I hope you find something if not anything useful from it.

  14. zero

    The most difficult part of AI design is to recognize human pattern on the fly. other problems can be solved, if designer put enough efforts in it.

  15. onreload

    Also regarding Gill in SF3:

    He has some of those “insta-reaction” tactics, like out-poking your poke before it even comes out, etc., but he falls victim to some spammed moves that don’t combo – Necro’s LP Tornado Hook in the corner can K.O. him completely off chip damage (so he doesn’t even build meter for Resurrection, Makoto can spam Hayate, Elena can almost do what Necro does with Tornado Hook, but with her Mallet Smash, though timing is more strict and you may have to change the version in between reps. Akuma can also repeatedly do some chip HK Tatsumakis to him in the corner.

    Everybody else isn’t that big a deal, except I wonder why Akuma always feels nastier than everybody else…I mean Q is the “secret” character and he’s not exactly programmed to be remotely formidable.

  16. Ryukenden

    The worst (hardest) AI is in KOF series. CPU reacts on every single move. You need to find some CPU weakness and abuse it so you could win.

  17. Maj Post author

    Yup, SNK games tend to have ridiculously broken boss characters, but their AI is usually nothing special. You just have to find the one or two dumb tricks they lose to and exploit them. Otherwise they won’t let you do anything. Not the best design approach, but i suppose it gets the job done – provided that people care enough about seeing character endings.

  18. fenris

    I-no from ggx2 has a special place in my heart as the worst boss character ive ever had to face. (although that may be because when i picked up guilty gear I has never played a 2d fighter before…)

  19. Maj Post author

    She was harsh too. I remember playing her in GGXX when it first came out in the arcade and almost winning a bunch of times then getting hit by some 70% damage bullshit. But yeah, she’s definitely an overpowered pattern character. You just had to know what to watch for because there was only one way to avoid dying instantly.

  20. ajunta

    Well first off it is a great article with an already deep report of what things are when it comes to (game AIs) in fact it is not really specific to fighters,
    STR AIs suck and give you bad habits,
    FPS AIs suck and make you believe it is all about shooting fast and aiming right which is in fact not enough.
    Real life AIs are asked to be as implicit as human and as explicit as machines, and they are 2 objectives contradicting one another.

    First thing first and it was well highlighted in the article and comments, is what is the objective of an AI ?

    beating the crap out of competition ?
    entertaining the humans and making them feel all warm inside even if they are terrible ?
    teaching stuff to people train themselves for human competition ?

    Harcoding an AI to beat the crap out of competion can already go a long way, in a STR the amount of data to overwhelming, in a fighter is is very hard too, but if you need you can always rely on superior reaction time and godlike micromanagment to bolster things on the CPU side.

    In fact the probelms is not that a superior to all flowchart exist or not, it is that even if it existed is so complex that the odd of it being properly hardcoded by a human are close to 0 and very expensive in human worktime to boot. There needs only of one mistake for the whole stuff to fall apart completely as it was said in the article.

    Besides as the akuma exmple showed it, such an AI could be very detrimental to Customer’s fun, Humans don’t like to be outmatched by something/someone that relies on “godlike” aptitudes to perform better, it is all about “ego” there is no point playing if there is no chance of getting better, if there is a unchallengable champion. The day they put An AI on a Formula one GP lineup, there is going to be some drama I ll tell you.

    So as a game developper you don’t really want that to happen and you’ll want to invest your money on the second and third objectives.

    to achieve the second objective you need a AI capable of emptily running into a noob missing 3 hadoken out of 4 , and blocking sometimes to offer a bit of variety, but you also need a program that will remain challenging for 95% of the player base. Okay then, lets go back to design number one, hardcoded imperfect flowchart but with a difficulty cursor…and so far that is what we’ve got. cursor evolved but in the back it is the same shit. but the 95% figure only lasts so long for Zangief lariat gimmick to spread over the internet.

    I don’t know for you, i know it is all the gaming industry is willing to commit into but I find it dull. Plus as you all know it complettely fails at objective 3, in fact it is even worsening your game if you play against it too often, sometime I face players they have extremely good execution but… they do weird stuff, like charging fireballs against a Ultra socketed vega… full jump in unsafe combos… nobody does that, it is plainly stupid but the CPU AI encourage that by not responding apropriately.

    Where i differ from the article is when it is said that a challenging but human like AI is not possible to code, or when I read in the comment on the fly pattern recognition is impossible.

    Of course on the fly pattern recognition is impossible, because “on the fly ” and “pattern” kind of contradict one another, we human don’t do pattern recognition on the fly either, we recognise a pattern at first glance because we have seen it hundreds of time in matches or in videos….and that a AI can do it too, google would certainly not lead you here if you wrote “snik huriane” but when 200 guys have crawled their way here after typing something similar he will.

    As for Ais not being efficient in CPU load that is only true because of the way things work in programming, we have been on the design path of sequencial programming for 130 years now, but only recently have we dabbled into parallel architectures, human brain is almost exclusively parallel and computing stuff actually resort to intermingled parallel processing and emmory comparison. In fact today’s AI could really benefit from using GPUs on top of CPUs. High memmory bandwidth and lots of simple parallel comparisons is key to time efficient pattern recognition.

    Providing we have a learning AI, and that would just be the first step, (we human learn but we also learn to learn, and we learn extremely fast so far nobody has a clue on how we do so well at that) we could do something that encompass all three objectives.

    With enough learning, it could defeat 100% of the competition at least witha comparable to tier list ratio, objective one is fulfilled and consitent over time.

    with a set of cursors

    -thourough (never misses on execution) unreliable (randomly misses exec closer and closer to strating point)

    -predictable (always go for the most probabilisticly favorable behaviour) surprising ( random but probabilisticly efficient)

    -environment mindfull (counting stun, spending 50% meter on a ridiculous combo to finish a match, saving meter for the next round) oblivious (noy taking anything meta game into acount)

    – Conservative (favorising low risk, mid reward) bold ( favorising mid risk high reward)

    – Evolutive ( self changing cursors over the match) steady (sticking to the cursor settinings)

    – overprotective ( defending and waiting for an opportunity ) fool hardy (taking high risks to create an opportunity)

    – opponent mindfull ( adapting her game to the palyer name / playstyle) standart gameplan (sticking to heuristics)

    – cheap ( abusing lacks in opponents ptitudes) honorfull ( scrub approach not using what works too well)

    – adaptative (can be scared out of some moves) tenacious (blames luck instead of considering the opponent is good a countering that)

    – slow reaction time (cannot react faster than most humans) twitch reaction time (substantially faster than human’s best)

    the sky is the limit, and you achive objective 2 you have tremendous amount of diffrent personnas to suit every body’s gaming ,

    noobs wanting to bash something
    scrubs wanting to discard what they consider cheap,
    praticing wanting to find the holes in their game you have objective 3.
    champions wanting to get better at fighting someione they can’t bluff, and trying to broaden their gameplans options.

    now the core question is how much CPU you need for that and how much time for learning

    The BEST plan is always simple for the AI, and is the exact same we use.

    Analyse what is going on -> parallel recognition and comparison with data that is where current CPU and memory amount/bandwidth bottlenecks solution use GPU to help and do like humans, don’t do it perfect do it well enough.

    Find what works against that,
    If there is nothing pick that character and do it next time see what humans can think of and steal it from them, but for the moment try anything and test your luck -> not consuming any computing power.

    if you have options put some of them in a hierachy from best to worst not much computing needed.

    if you have more than one pick one according to you gameplan (random, best, randomly one of the best, surprising it all about the cursors here ), simple math cacluation (fast for a machine)

    do that perfectly simple task for a machine.

    did it work ?

    yes, why ? update your database accordingly.

    no, too bad ? update your database accordingly.

    The thing is a machine can have access to milions of replays and training sessions do a thourough frame by frame analysis, and it can do that in a matter of weeks, a human cannot store that amount of knowledge and supposing he could, could he even use all of it during a match and remain competitive on the other fields.

    In the end the machine still somehow uses super human capabilities huge amount of knowledge, frame accurate analysis and execution.

    But i put my money on the fact that this kind of things don’t hinder human player interest quite on the contrary because these are things a human can try to learn himself or work around.

    because if the game has been done well, the computer to has to take risks to win and cannot afford to be predictable, and that opens the door for human victories.

    If the game hasn’t been done well you can use the AI to highlight what is “unfair” in an objective way (forum poster’s can’t), and have it changed in the rules.

    I am willing to bet such an Ai would actually rasie people interest for discovery when playing a human, instead of being labelled “cheater”, because all it has is machine reaction and machine execution.

  21. Maj Post author

    Wow, that’s a lot of information sir. I don’t really know where to begin. You make a lot of claims which seem reasonable, or at least plausible, but there are a lot of what-ifs surrounding many of them too.

    I mean a lot of that process sounds slow and expensive, especially expecting developers to play trial-and-error with that many sliders. I suppose it’s possible for a game with as much popularity and sustained financial success as WoW. But i have a hard time imagining it happening for a fighting game unless they start charging monthly subscription fees.

    Also i disagree with your statement regarding AI’s potential role in determine whether a game is good/fair/balanced. I think that would be a very subjective way of determining overall quality because it’s in the programmer’s hands.

    Spending more money on AI development can make a bad game look good, or spending no money could make a good game look bad. There’s no objective comparison because you can’t take Mortal Kombat AI and make it play Street Fighter. I feel more comfortable listening to what “forum posters” have to say.

    If we’re talking ideally, i have no doubt that some ridiculously talented programmer could take SSF2T and build an amazingly fun/rewarding AI opponent for us to play against. Realistically though, i just can’t picture it actually happening.

  22. ajunta

    The thing is at some point there is no “programmer” , the machine and millions custommers are the real programmer.

    If you take “google” example it is very clear, there is a “code” in google, but that is not the most intresting part of google anymore, google rocks because it has a 20 years old learned database and is still learning. if you get rid of google’s database it is no better than say…. “bing”.

    The beauty in that the program is here to use, fill and update the database, and that is all. all the tedious part of the programming(the ultra complex flowcharts) is done by the machine itself by playing the game and watching the game being played, trial and error.

    The above cursors would not need to be tweaked by the programmers either.

    They would be left to be set by players to suit there needs for fun/variety/training/challenge in an interface that could look like that

    A – set difficulty level for AI and it moves cursors in the background accordingly

    B – select one of the personnas ( a personna would be a determined set of cursor settings)

    C – create random personna (randomizes all cursors)

    D – go advanced and slide the cursors yourself.

    You have to see the cursors like human “moods” or “hormon driven behaviours” or “traits”

    You don’t play the same when you are pissed and when you play one of your noob friends in a casual, but in the background you sit your game on the same basics,

    Being pissed can lead you take huge risks, but it could also lead you in an unsafe but somehow overwhelming foolhardy rushdown or streak.

    When you play your casual friend you are not any worse than usual but you go easy on him and give him some time to think, you don’t end the match with your 60% health combo everytime the occcasion shows until he plays well enough to hold his ground.

    So basically the cursors are just “on the fly” tweaks to the otherwise regular combination of a simple code game plan acessing on an ultracomplex evolutive database, they help in variety but they are not the essential of the AI capability, some of them can be used to cripple the AI or on the contrary to boost it slightly above human’s best, the graet majority don’t have such dramatic influence.

    I am not sure it would work in “wow” to go all deep into that, “wow” server has to pilot thousands of AI mobs at the same time, and I am not sure people playing “wow” look for challenging Ai opponents, it is all about “bashing”, even bosses scare the custommer’s away when they are not defeatable, when a guild has found the flowchart of a boss they can farm it and get the phat loot, that is a kind of “moral contract” binding devs and subscribers. The whole business is based upon that.

    I think the development cost is fairly reasonable, plus the industry is not necessarily going to have to put the money upfront, a third party company could develop the code , and the code is going to more or less fit for every fighting game.

    The only problem is that when the game is released the database will be like a newborn ready to learn but knowing very little and it is going to become better only with time passing by since it relies on human competition to learn and improve (just like we do, “today’s daigo” would destroy “day10 daigo” single handedly), the company that develops that will make huge money when namco/capcom etc… are embedding the technology in every of their product.

    I don’t believe in the talented programmer(s) approach, nobody can program daigo (whoever) flowchart but his very own learning engine because it is an ultracomplex hormon driven and random seeded flowchart, nobody can program google but its very own learning engine because it is an ultracomplex flowchart, the amount of data to code is overwhelming and high numbers of things to code make for high odds of “mistakes”. Plus it is not evolutive.

    The real hurdle here is the hadware, modern gaming computers have huge amount of storage, tremendous parallel and sequencial computing power, huge amount of memomy , and memory bandwidth, the popular generation of fighting game platforms XBOX360 / PS3 are somehow terrible in those fields.

    As for tha AI being good to highlight what is “unfair” it is subjet to debate yes, but not because of “programmers” they have close to no control over the AI gameplan, but more because of the fact that it is not because a machine can apply a gameplan that humans can have the same succes with it. In the end from a business point of view it is better to listen to the custommers , they buy the game the AI doesn’t.

  23. Maj Post author

    Well, i have to say i’d love to see what you’re describing implemented in a Street Fighter game. I’m still a little skeptical though, because we’ve never seen anything remotely as sophisticated in a fighting game before.

    Not to sound like a naysayer – i certainly hope it happens, but i guess i’m not holding my breath.

    Out of curiosity though, since you seem to be into this subject (whether as a hobby or a profession), doesn’t it scare you a little? I mean i’m not scared of challenging/adaptive Street Fighter AI, but then it seems like the ultimate goal of AI is to push the envelope until it does become scary.

  24. ajunta

    Well that is a metaphysical question…

    I guess that is evolution, If a machine can evole beyond where we are ( and there is certainly room for improvement) it revolves around that question: “how does the ruling specie treats the species it dominates ?” if they do what we humans do, yeah we should be scared.

    now maybee the next ruling specie, whether it is a machine or an organic system, or a combination of both, will get clever enough to value equilibrium more than we have so far,

    In which case it is all good, human will evolve and what we are will disappear, the terrans species that lived the longest haven’t been existing around 10 000 000 years, we are…. ten millions years from that, I doubt things are still similar to what they are now in a million year, what replaces/obliterate/embed us in the future… the heck we know.

  25. Maj Post author

    Well, i’m not even thinking so far ahead as Skynet declaring war on the human race. Of all the potential causes of human extinction lingering over our heads, militant computers aren’t at the top of my list.

    Mostly my concern is, how far can you go with AI before you have to consider treating it differently from a toaster?

  26. ajunta

    Well, that is a tough question I guess, some people value a toaster over the life of a dozen human living 6000 miles away from their condo, I am not judging but “consideration” really is a matter of personal ethics.

    can be broken into 2 questions :

    It is all about what arises consideration in your mind,what do you value in things/beings?

    Ai is a broad term so can an AI have these things you value and does it require any of these things to be called an AI ?

    I would consider treating the fighter AI with 6 month training better than most animals.

    But don’t mistake me, I am not speaking of self awareness here, or anything like, I don’t think an AI has to be self aware to be considered smart, but if that is what you meant then you have your answer, you ll consider Ai diffrently when they value their own existence and can socially interact with you. But that was beyond the scope of my posts.

    I was merely speaking of adaptativity and training AIs to play a fighter nothing “socially” interacting.

    Could have taunting routine though :) (even if it is one sided in the background)

  27. Maj Post author

    Here’s another way to state the issue. Fighting games by their nature are very dynamic. Every move has a counter, so playing against human opponents feels like a fluid experience with constant adaptation.

    The problem with fighting game AI is that it never adapts, which means it can’t develop new strengths. What really hurts is that it can’t develop new weaknesses. (In fighting games, strengths and weaknesses are two sides of the same coin.)

    What that means is, each AI opponent has two or three exploitable holes in their gameplan. If you know what they are and capitalize accordingly, you can beat them consistently. But you can’t play the match any other way.

    And since their weaknesses never evolve, you’re stuck fighting the same exact way every single time you play against the computer. Maximum difficulty AI is especially guilty of this behavior, narrowing the range of successful strategies to a thin strip of the game’s true potential.

    I feel like practicing on 5-star or 7-star difficulty is actually more effective than training on 8-star (max level) difficulty. At least the lower difficulty levels allow some deviation from whatever dumb trick you need to beat the highest difficulty opponents.

  28. ajunta

    Why do you assume an Ai can’t adapt, the only limitation binding an AI is the same we have, the amount of combination of button press and releases over time that the game engine allows in street fighter that number is 2^card[up,down,left,right,select,start,a,lp,lk,mp,mk,hp,hk] every frame that is only 4096

    to have the maximum number of possible combinations of courses of action you have to empower 4096 to (99*60) frames in the game and that is a freaking big number even for a machine but it is a very finite number.

    All that to say there is nothing that restricts a machine from trying one of the combination it (or anyone else from whom it analysed a replay) has not yet tried in that given situation at that given time more than it restricts you, if you want to walk up close and taunt as okizeme why not, the machine can do it too, and then store the result in its database.

    there a a lot of easy formulas to seed reasonablme random into an otherwise dull heuristic procedure. which will make the AI efficient but not exactly predictable.

    for example lets say you recognise a situation you have several options (for simplesness of descrition lets restrict the X possibilities the game engine allows to only 3)
    option
    A tested in that very situation, works perfectly weight 89
    B tested in that situation but against anotrher character, trades weight 10
    C one of the not tested solution weight 1
    (weight have been chose to add up as a 100 but really they don’t matter, the machine calculates them and updates them in its database whenever it gets feedback from playing or from watching replays)
    here we are going to set a cursor that we are going to call ‘surprise /humdrum’ to 2

    courses of action sum 89^2 + 10^2 + 1^2 = 8022
    select random number between 1 and 8022
    0< number < 7922 choose A (odds 98.7%)
    7921 < number <8022 choose B (odds 1.2%)
    8021 < number < 8023 choose C (odds 0.1%)
    you can call that profile
    "solid game play but room for learning"

    now if the player was to modify that cursor to 1
    we have
    0< number < 90 choose A (odds 89%)
    89 < number <100 choose B (odds 10%)
    99 < number < 101 choose C (odds 1%)
    the machine having the same game knowledge has a much more suprising behaviour you can call that profile
    " varied gameplay reinforce new strategies behaviour"

    put the cursor at 0 you get
    A odds 33.333%
    B odds 33.333%
    C odds 33.333%
    the machine in spite of it game knowledge
    you can call that profile
    "pure random unbiased feedback gathering"

    set that cursor to -1
    option A odds 0.1%
    option B odds 9%
    option C odds 90.9%
    you have a machine that resents using what it knows works and will very likely use something it has never tested or knows doesnt work.
    you can call that profile
    "serendipity behaviour"

    a few month later the machine having ben,efited from a lot more feedback in the very same situation could very well have updated the weights as such
    A works perfectly good damage weight 50
    B trades against that character but cause a untechable knockdown on opponent weight 45
    C beats opponent flat but cause minimal damage and gives frame adv to opponnent weight 5

    and all situations with the cursors give other odds for each course of action.

    add more cursors, expand the possibilities from 3 to the whole lot of what the game engine allows (150 maybee for any given okizeme situation)

    and all you coded is the formula and where in the formula the cursors interact, and the player sliding the cursors before the match just like you set the stars for the current AI,

    everything else is the machine modifiying her weights in the database detecting what the current situation is and using the formula you designed to act upon what it sees and what it knows yet about the current situation it has detected, and when it knows jack it just tests random stuff or try something that worked in a similar sitatuion (same timing and distance other char, same char and postion one/two frame before or after, same char same frames, but slightly different distance and if it still has nothing test out something compeltely random) and then updates its knowledge base with the result.

    as the weights are never fixed in stone the machine is never completely "finished" as the cursor can always be slided, even in a given situation and with a very seasoned knowledge base the machine can always be made diffrent from the match before by a simple randomization of the cursors and yet equally challenging , just like playing daigo's then poongko's ryu, both have a very similar basis and will share a common ground of ryu's common sense, but then they have different personnas, shortcomings, strenghts and generally speaking playstyles.

  29. Maj Post author

    That sounds like a pretty solid approach. Although getting it done in the real world seems like a high-budget task. I wonder how big of a dedicated AI team you would need to pull it off.

    To get it done right, you’d probably have to make it a top priority from the start of the project. Unfortunately most fighting games have only one or two people focusing on building the AI, so they’re usually scrambling to meet the bare minimum genre standards.

    Not to mention, AI engineers kind of need to know what most characters play like before they can get the bulk of their work done. That means they’re constantly lagging behind the production schedule of the rest of the team. Since games tend to cut it very close to every deadline, this puts the AI department in a tough spot.

    To build the best AI, you’d probably need an extra three months after the game is done. I doubt you’d be able to convince a publisher to keep paying for AI development 2-3 months after the game ships. So that’s one of the main challenges – keeping pace with the rest of the project as characters and game systems get redesigned multiple times.

    Have you had any experience with programming AI? If you’ve worked on a game that i might’ve played, i’d love to talk about it.

Leave a Reply