Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice
  2. We've opened up a space to discuss, share feedback, and showcase everything related to the Unity Shader Graph! Come show us what you've made.
    Dismiss Notice

How is AI Designed in Smash Bros

Discussion in 'Game Design' started by Devastadus, Jan 31, 2019.

  1. Devastadus

    Devastadus

    Joined:
    Jan 27, 2015
    Posts:
    28
    I am curious to how they do it. If you look at the new Super Smash bro's it has 76 different characters, 103 different Arenas, Tons of items. and just a heck a lot of variations. After playing it the AI seems very competent and can handle pretty much any arena/character/item combo.

    So how do they design this thing? Do they use some sort of machine learning? I see you can 'train' your amiibo, but the AI in smash is good even in the old ones before AI was really a thing. Behavior Tree just seems infeasible, there would be way to many conditions and the AI doesn't seem to follow really any patterns. How are they achieving this?
     
  2. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    5,070
    Why? Like, I don't think you understand that behaviour trees can deal with broad strokes as well as specific situations.
     
    SparrowsNest, Ryiah and BlankDeed like this.
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    7,749
    AI for a fighting game isn't hard. The traditional approach is just a bunch of heuristics — pick an opponent; if he's too far away, use a ranged attack if you can, else move closer; if the distance is right for a close attack, do it; if being attacked, consider blocking, etc.
     
    BrandyStarbrite likes this.
  4. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    1,089
    For the classic fighting games like Street Fighter 2, Hyper Fighting etc
    and Mortal Kombat 2, or any of the fighting games, released during the
    early to mid late 90's.........

    What they did, was make it, where whenever the player did a move
    command, for like eg. Ryu's Ha do ken or Sub zeros Freeze magic etc.
    A few frames before the move you did, would actually be seen onscreen,
    the AI opponent was programmed, to immediately react to it.
    Eg. Jump over it, block etc.

    So in other words, whatever move you performed, or whatever button
    you pressed, the AI was programmed to react to it. That's why alot of the
    classic fighting games, were so hard to beat. Because the cpu would
    read your input command, then immediately counter attack, before
    your move came out.

    Fighting against cpu Ryu in Street Fighter 2, or fighting the cpu in MK2,
    are some really good examples of this. :p

    It's possible, that smash uses a combination, of this technique and a few others.
    But knowing nintendo, they probably did some special programming tricks, to
    achieve this.
     
    Last edited: Feb 2, 2019
    TenKHoursDev likes this.
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    13,556
    What's hard is testing it when you don't have the skills to keep up with it. :p
     
  6. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,231
    Honestly, it could be as simple as a random, weighted table for behaviors. Especially considering World of Light and all of the variety in it, it probably wasn't more complicated to configure than a wall of sliders to define preferences.

    The behaviors themselves are probably more complicated, but those probably aren't much more than steering behaviors.
     
  7. SparrowsNest

    SparrowsNest

    Joined:
    Apr 6, 2017
    Posts:
    1,381
    +1

    A good behavior tree can deal with an infinite amount of variations(arena, opponents, weapons) and come up with a different solution for each time it encounters a particular situation.
     
  8. TenKHoursDev

    TenKHoursDev

    Joined:
    Nov 9, 2014
    Posts:
    908
    Yes. But efficiency. Also complexity management.
     
  9. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    1,089
    So true.:p
     
  10. Volcanicus

    Volcanicus

    Joined:
    Jan 6, 2018
    Posts:
    43
    The way I have seen the AI move and so forth leads me to believe they recorded combos ahead of time in terms of input and copied the intrinsic commands. That's why you'd see computers shield move, grab throw up, jump + A and then "show me your moves".

    That's also why it is easy to counter computers as if you know what the combo entails, you can react ahead. This is for "smash" games rather than the 90's classics. So if you want to make a smash game with good AI, I recommend you play your own game and see what combos exist and make them.

    Difficulty would assign idle-time or "failure to react" randomizers.
     
  11. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    11,508
    Keep in mind that it's quite possible that there's data embedded into arenas to help out with this.

    For instance, the AI doesn't have to be detailed enough to identify areas which are good for using an AOE special attack. Instead, the level can have some places marked as being good for this, and rather than figuring it out the AI can just look it up.

    This not only makes the AI much less complicated, it also gives the designers much finer control over the experience. Rather than having to design areas such that the AI recognises them as being good for certain purposes (which is super complex when you consider that both levels and the AI are probably being developed iteratively and in tandem), instead the designers build areas how they want and then mark what kind of behaviours should be used where.
     
    SparrowsNest likes this.
  12. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    2,043
    Ya there are a lot of problems in games that are really really hard problems if you just try to solve them algorithmically. But which can be made really simple with designer choices hardcoded into the game. Like I was reading another post on someone wanting to design this crazy complex navigation system for ai picking alternative paths to a target around various obstacles. And the obvious simple solution was just hardcode a number of way points into the map and select between them.

    It's one of those things I think you have to learn the hard way. By seeing all of your great engineering get thrown out because of pivots in design. Go through that once or twice and it changes how you approach pretty much every hard problem.
     
  13. BrandyStarbrite

    BrandyStarbrite

    Joined:
    Aug 4, 2013
    Posts:
    1,089
    That might be suitable, for a game with dinosaurs, or monsters chasing after, or hunting you, the player.
     
  14. SparrowsNest

    SparrowsNest

    Joined:
    Apr 6, 2017
    Posts:
    1,381
    Or PCG levels, might be able to do some logic for special areas and alike, but you know what i mean