Wednesday, February 29, 2012

Game Design: Game of the Week 8 - Super Smash Brothers Brawl ~ Learning AI?


This week in game design was more of a warm up, going over some topics we had already gone over before. Among them of note was difficulty though and that’s something I wanted to get more in depth with for this post. There are a variety of ways one can ramp up the difficulty, and I don’t mean for any specific game. There are general methods, such as the easier to implement, selectable difficulty (from easiest to hardest), the pacing of the game (making it harder as you go along) and the most interesting of all, dynamic difficulty. 

Dynamic difficulty is the hardest to implement in any game because you have to detect just how well a player is doing. It can be several things, from observing and noting behaviours, to seeing how well they are doing over the course of the game, etc.

Different games have different ways of implementing this and it’s not always a common sight in games. Some examples though include changing the layout of a level, changing enemy strength and smarts, changing the rules and restrictions of the game, etc. This of course applies to any sort of difficulty change, but dynamic difficulty is more interesting because it has to watch carefully how you’re doing and make the right transition smoothly. The reason people might want to use this dynamic difficulty is so that players are always given adequate challenge.

Flow Theory

Quick note, we went over flow theory which is in essence, being in the zone. Time seems to slow down for you, you’re completely focused on the task you’re doing and you’re not really thinking about it, you’re just doing things automatically. This is a state that game developpers would like to strive to achieve, so that people will be spending all their time fully immersed in the game. In order to achieve the state, you can’t be bored, meaning it’s not too easy and it can’t be too difficult. This all depends on your skill and the difficulty of the game.

So to go with what I was talking about dynamic difficulty, difficulty changes to match your skill so that you get into the flow of the game! Well this was a longer introduction than I expected to do but it’s important. For the game of the week, we will go over Super Smash Brothers Brawl and how their AI is difficulty wise, and some interesting behaviours that many people have been observing closely, I will get into that later on.

Game of the Week

Super Smash Brothers Brawl is the third entry in Nintendo’s very popular party fighting game franchise. This one, being on the Wii boasts the largest cast of characters, stages, items, unlockables and secrets. The game brings together characters from various series of Nintendo’s history as well as guest characters including Sega’s Sonic the Hedgehog and Hideo Kojima’s Solid Snake from the Metal Gear Franchise.

Combining franchises from all over Nintendo since 1999

Basic information on the game

2 to 4 players compete in battles with the goal to knock their opponents off. Rather than dealing with “vitality” like most fighters do, whenever you hit an opponent a percentage increases, which designates how far a character will fly when they are hit. The goal is to knock them off the stage, preventing them from getting back on or knocking them to any of the four sides of the screen.

The entire roster of characters in Brawl

Player’s choose from a large roaster of different characters all with different attacks and abilities, including abilities that aid the player in getting back onto the stage should they be knocked down. For your attacks, you merely press either the a button or b button (on gamecube controllers) and a direction on the control stick to execute different attacks. You can pop up a defence shield to absorb attacks, as well as dodge either by rolling or in place. To counter shields, you can execute throws against opponents which will snag them no matter if their shield is up or not, but they can still be dodged.

A Free for all match between four players online

The system is easy to get the hang of but there is enough depth that the better players will always come out on top of the weaker players. The game has a variety of systems that keep the action frantic and exciting, the inclusion of items which can turn the tide of battle in your favour or against you and the newest item being the smash ball, which allows characters to use a devastating ability against your foes.

Main menu

There are a variety of single player modes, including a decently long adventure mode titled Subspace Emissary with an unsurprisingly uninteresting plot. Other modes include, multi-man melee, where you must defeat a bunch of faceless enemies or survive as long as possible, home run contest, classic mode (fight against a variety of opponents with special modifiers such as 3 vs 1 giant character), as well as being able to fight the computer in multiplayer. Multiplayer consists of online modes, special Brawl where you can choose from different modifiers (such as giant characters, all metal characters, etc) to make it more interesting, tournament modes, and the normal multiplayer mode. In all multiplayer modes you can fight against ai opponents.

The Artificial Intelligence

I am sure most of us already know what Brawl is all about so I won’t go any further into other features in the game like that, I want to get into what I was focusing on before, the AI. Now when you choose CPU opponents you choose from a variety of different levels, 1 to 9, 1 being the easiest and 9 being the hardest. At level 1 for example, they usually just walk around, throwing a random attack every now and then, while on the other side a level 9 players will be using their entire arsenal of moves, dodging and shielding your attacks and acting more like a human player.

The different difficulty levels you can select

There are many games out there that modify difficulty in much lazier ways, such as just increasing their damage, health, etc. For fighting games in general, when the difficulty of an AI is increased, it must always be about it’s behaviour, if not then the AI is not worthy to being in the game. Other games of course do this but there are still a lot of games out there with incredibly stupid AI, that only are able to kill you because they suddenly just shoot in your direction. Otherwise that AI might stand out in the open like they are a commando (looking at you Call of Duty).

Super Smash Brothers Brawl of course does this, like I mentioned. Level 1s are cannon fodder while Level 9s can actually present quite a challenge to some players. Of course they are no match for the best of players but for lower level players they are quite fun to fight against and provide a decent match for them.

Example of Super Smash Bros. Melee's AI

Now Brawl represents a great step in AI from it’s predecessor Super Smash Bros. Melee. In Melee, the AI simply walked around the stage and if they got close enough attacked you. If you shielded, they automatically tried to grab you. They hardly ever used all of their attacks as well, simply using light standard attacks over and over. This made them extremely predictable, I was able to bait out their grab attempts on me by just holding shield and waiting till they tried to grab, and then punish them. They would almost always use the same basic attack once they got into range of me, and the powerful smash attacks that  all characters have were hardly ever used when I had a lot of damage on me. They could have easily sent me flying to my doom but instead they just wanted to keep hitting me with those light attacks. This was all on the hardest AI too, they were pretty stupid. That was just my experience though, perhaps I never even let them get the chance to use the attacks.

A Free for all match between 4 CPUs

Now Brawl on the otherhand shows a great change. I’ve looked on various forums posts and pretty much everyone agrees the Brawl AI is much more difficult. They are much smarter, using their defensive abilities (roll and shielding) at appropriate times, almost seeming human-like though they are still running on algorithms that are calculated. The thing is they try and choose from a variety of different options instead of always choosing the same one like in melee, they might dodge, they might roll, they might just try and shield, or they might try and counter attack. If they head towards you, they might charge in with an attack or roll to try and bait and attack from you, then counter attack. The algorithms that the AI follow are much more difficult to pinpoint, though there are still ways to exploit them. Also they sometimes have issues if a stage is particularly odd (or user created) and can suicide with items if they blow up. Without items and with a normal stage though they can be rather competent. It’s much more difficult to exploit them then it was in Melee and overall it makes the AI players more challenging and more fun to fight against.

Two AI performing a rather well coordinated "combo" on a player.

There are a few interesting things to note though about the AI. One, they actually try and target you first and foremost. If you are in a free for all match with you and 3 other AI, you might notice that they are usually trying to chase you. That’s because they hate you and they are programmed to go after you as a priority. Only under certain circumstances will they try and deviate to attack their AI brethren. I first noticed then when I first played the game, I thought I was against an entire team due to their behaviour. It’s unfortunate that it’s like this because it kind of takes away from the free for all feel of a match when they all gang up on you, KO you then attack each other after you died.
In this video a player fights against CPU opponents. Notice how they go after him more frequently then each other.

Can they learn?

This is what I really wanted to talk about in this blog, it is the potential learning behavior of the AI in this game. Yes, Brawl’s AI can learn, at least that’s what many players believe. It seems as if, after playing for a long time the Brawl AI will be observing your attacks and calculating just what is going on that’s working, what is hitting the bots, what attacks and techniques are you using that are effective? Sometimes they might just try using your moves and copying you even if they aren’t effective.

Footage of an experienced(Tournament level) player's footage versus his AI counterpart

For example, I tend to use Link a lot, playing with him right when I first got the game. Now the AI just used basic behaviours and such, nothing special. After a while, I fought an AI playing as Link and I noticed something. He was using techniques I frequently did. What I liked to do was grab a bomb, jump back and throw it at the same time, very oftenly, at a certain jump height too. AI started doing that. I frequently use the jumping A, forward aerial attack, at a very low height. The attack consisted of two slashes and I made sure I got both in. AI started doing that a ton. I did a jumping boomerang attack frequently, similar in the way I used the bombs. AI used that behaviour at the same distances I usually tried do it.

A player versus an AI that he believes fights similarly to Ally, one of the top Smash Brothers Brawl players in Canada. The AI demonstrates a high level of play against the play, meaning it's very competent.

The AI calculated where and when I used these attacks, what distance I was to other players and other factors it believed contributed to me using the move. Now I thought at first it could just be wishful thinking, but I noticed this with many of my other characters too. The AI would repeat actions that I frequented, such as using Falco, I jumped and immediately used a dashing ability. AI liked to frequent that move quite a bit after I was using for a while. Not only did it try and copy my moves but it seemed to overall know better when to dodge my attacks, they became very slippery and difficult to hit if using the same tactic over and over.

A player's test of the AI's ability to adapt to an attack. By the end the AI is able to counter the move the player uses over and over.

The most obvious and rather funny example of this is to have a 4 player match (real players) all using Captain Falcon. Using his famous Falcon Punch over and over throughout the match has yielded results where the AI adapted to this, using Falcon punch more and more frequently than it used to. It was definitely “learning” to do this, though it wasn’t exactly effective, it was using this knowledge.  Another interesting example is that some players might have taught them to taunt. The infamous “teabagging” known in many first person shooters has been reportedly done by AI. I myself experienced this against an AI who KO’d me, then proceeded to walk to the edge of the stage and tea bag. This may be wishful thinking but I believe they learned this to since I did it from time to time.

An AI using Falcon Punch repeatedly many times in a row

CPUs learning to teabag

More CPU teabagging


I know there is no definite answer to whether they TRULY learn or not but I am greatly leaning on the side they do. My experiences against the AI and the Captain Falcon Punch example feel like proof enough for me. Other people also think this is true, as some AI have shown some pretty neat skills they have learned from their human counterparts. But in any case, I think it’s really awesome that Super Smash brothers Brawl does this. Any other game that does this kind of learning behaviour deserves props for this because it’s always fun to try and teach an AI. It’s like having a pet.


I found a very useful post, with some videos testing the AI, it's actually pretty neat. This person is trying to break down the way the AI is able to adapt to situations. Unfortunately there isn't too much more progress with it, but the information that was found is interesting.

CPU learning Tests 1

CPU learning Tests 2

CPU learning Tests 3

CPU learning Tests 4

No comments:

Post a Comment