Minion AI Rules Documentation

RiotRiot Reinboom·8/25/2016, 6:27:59 PM·1 votes·127,362 views

Hello! I’m Riot Reinboom and I’m here to drop some Sweet minion AI game documentation on you all.

What? We’re sharing our understanding of how a bunch of weird behaviors of how lane minions work internally and figured it would be informative for you all as well. So, documentation. Exciting stuff.

This won’t cover the behaviors of all minions and instead just covers lane minions (hereafter just referred to as minions). Primarily, this will focus on some of the more quiet features. This is all also Summoner’s Rift specific. Other maps and modes may change these rules (though, usually not).


#General Minion AI Rules Lane minions have a “list” of actions they check if they can execute, following through with the first valid action they reach and ignoring the ones after that. Minions always have a “goal” they’re trying to fulfill in some way. Even while walking, they’re actually moving towards a specific point that keeps changing as they get closer to it.

#The Behavior Sweep Every 0.25 seconds, each minion will go down a checklist of options until it finds a valid one to do. It won’t follow invalid actions, and it won’t follow actions after that. This means that in this list of options, the catch-all default option is last (walking towards a waypoint).

##AI Priority List

  • Follow any current specialized behavior rules, such as from CC (Taunts, Flees, Fears)
  • Continue attacking (or moving towards) their current target if that target is still valid.
  • If they have failed to attack their target for 4 seconds, they temporarily ignore them instead.
  • Find a new valid target in the minion’s acquisition range to attack.
  • If multiple valid targets, prioritize based on “how hard is it for me to path there?”
  • Check if near a target waypoint, if so change the target waypoint to the next in the line.
  • Walk towards the target waypoint.

If a minion can’t follow any of these behaviors, it will do nothing.

Minions have a lot of checks to note whether or not a target is valid or not. There’s obvious ones like “which team is the target on” but also non-obvious ones like “where on the map is my target”. Many of these will be covered further down.

##Interrupts There’s also a number of things that can occur between the 0.25 second interval of the normal sweep through the AI Priority List. There is no particular order to these.

  • Taunt/Fear/Flee/Movement Disable/Attack Disable. All of these cause a minion to freshly reevaluate its behavior (following the AI Priority List) immediately.
  • Call for Help. Minions ‘hear’ signals from nearby minions and champions being attacked (even by other minions). This causes them to recalculate their current target and prioritize the attacker that caused the Call for Help.
  • Collisions. Minions that end up overlapping other minions will reevaluate their behavior immediately. This usually causes them to shift around to get off each other.
  • Their current attack target dies. Minions who witness the death of their foe will check for a new valid target in their acquisition range.

#Waypoints When lane minions spawn, they get assigned to a list of points (the waypoints) that follows their intended lane.

By their default behavior, minions will always try to move towards the next waypoint. If they get near that point (with a rather large circle around for “near”), they will change their waypoint target to be the next in line. All waypoints eventually lead to the opposing nexus.

For a lane, waypoints are the same for both teams. Each team just changes the direction it searches for the next waypoint in in the list.

An example of some of the bottom lane waypoints and some lines showing the group they are in: http://i.imgur.com/2qz2CSx.png

#Ranges Lane minions have three primary ranges: Collision, Attack, and Acquisition

Here’s a melee minion showing all three of these ranges: http://i.imgur.com/4I8ekIO.png

Acquisition Range In the image above, Acquisition Range is represented by the largest circle (red). When minions sweep for valid targets, they look only to this range and no further.

Attack Range In the image above, Attack Range is represented by the second smallest circle (bright green). When minions try to attack their target, they must first get them within this range.

Collision Radius In the image above, the Collision Radius is represented by the smallest circle (black). This is the radius for which all other ranges must reach in order to be valid on an opposing unit. In many games, this is also known as the hit box.


#Specialized AI Rules Minion behavior can change dependent on the area of the map they’re in and/or based on when they were spawned. The most important of these are: The First Minion Wave and Region Avoidance. #First Minion Wave The first minion wave has modified behavior. This behavior difference is meant to ensure a that if the first minion wave goes untouched, the minions deaths in that lane are almost mirrored for both teams through at least the first minion wave.

There’s a few things we need to control for in order to ensure a balanced outcome. These are:

  • Minions update every 0.25 seconds. Increasing this isn’t reasonable as it strains the game servers to do so.
  • Minions spawn with a notable gap between them and carry this pace when walking to lane. This gap means that when a minion finally sees an enemy minion, it sees only that enemy minion.
  • Minions like to reevaluate their current target for potential better targets a lot. This is why their behavior feels erratic. This is primarily caused by Call for Help and Collision.

There’s also some possible solutions we’ve tried in the past that show harder to pin issues of the AI. For example, when we made minions assign their initial targets at spawn it caused top lane and bottom lane minions to take a tighter turn to get to their target, pulling the whole wave closer to the river.

In order to get minions dying in an orderly fashion early in the game, and dealing with the above constraints and discoveries, the first minion wave has numerous AI changes.

##“Distribute Fire” Prioritization The first minion wave prioritizes targets with fewer allies already targeting that enemy. This causes them to naturally distribute their focus.

##Temporary Caster Minion Ignore When searching for their first target, they will ignore any caster minions they find. This ensures that a melee minion doesn’t run to the unfocused caster minion line when trying to distribute fire.

Caster minions will still wake up a minion (see “Multiple Acquisition Ranges” below). If after 0.25 seconds a minion still hasn’t found a valid target other than the a caster minion, it loses the caster minion ignore rule.

##Ignore Allied Collision before lane The first minion wave ignores all allied collision before they pass the first turret. This ensures that allied champions can’t manipulate the specialized behaviors of the first minion wave.

##Radio Silence When getting a Call for Help from an allied minion or collision, the first minion wave minion that hears it will refuse to sweep its behavior again. This ensures they stay focused on their current target until its death.

##Multiple Behavior Shut-offs All of this specialized logic can be shut off from various game states. If a minion ever targets an enemy champion or hears a call from help caused by an enemy champion, it will reset to default minion AI. If a minion’s target ever dies, it will also reset to non-first minion wave behavior. This ensures that once lane action actually occurs, minions start acting normal again.

This rule is especially important to ensure that the Radio Silence rule doesn’t cause minions to chase a champion forever.

##Multiple Acquisition Ranges Unlike the default minion behavior, the first minion wave has three different acquisition ranges: Wake Up Range, Acquisition Range, and First Acquisition Range.

These are all used to solve a tricky math problem created by how minions are spawned. Minions are spawned with some time between each one, forming a line with a leading minion. This means that when the leading minion is finally within the acquisition range of an enemy minion, it is very likely the ONLY minion in that range at that time. The long delay on the sweeps (0.25 seconds) can cause more enemy minions to sometimes to be in range when the sweep finally occurs, making the whole thing very unpredictable. Distribute Fire can’t solve this alone if it’s unpredictable whether or not it gets enough minions to check.

Wake Up Range: First wave minions spawn in an asleep state. While in this state, they ignore ALL behavior until directly interacted with or an enemy unit enters their Wake Up Range. It is smaller than the acquisition range. Acquisition Range: This is as normal (see way way above). First Acquisition Range: Immediately upon waking up, a minion will try to find its targets in this range instead of the normal acquisition range. This range is larger than the normal acquisition range.

All of these together ensure that minions get a broad array of enemies to then check against its other behaviors for its very first target acquisition.

Walking through this with screenshots should make it more clear.

The minion hasn’t woken up, even though in this case it would ‘target’ the first minion normally. Even with the ‘first acquisition range’ circle (the white circle), it would only choose between the first two minions. http://i.imgur.com/9Cd3CWe.png

Now that the minion finally has an enemy minion in its wakeup range (the blue circle), it “wakes up” and compares all the minions out to its first acquisition range (the white circle). http://i.imgur.com/7D87h6h.png

It discovered the 3rd melee enemy minion has the least number of things targeting it, so it uses that as its preferred target. The opposite happened with that minion, effectively assigning them to each other. http://i.imgur.com/ztducSf.png

From here on only the red ring (and the attack ranges) of the minions really matter. This is the default acquisition range for minions and what every minion after the first minion wave uses always.

#Region Avoidance Following just the General Minion AI Rules, there is nothing to actually keep a minion from following an enemy through the river or jungle, across the map, and into other lanes as long as it keeps its target.

In the past this meant you’d experience awkward “minion chase” scenarios through the jungle which finally ended only when the minion lost vision of your champion (most commonly through jungle brush).

Since Season 2016, Lane Minions now avoid specific regions of the map.

This rule is special because the solution is as obvious as it seems from a problem description standpoint: “Don’t chase into the river!” (or jungle or base perimeter). Unfortunately, that’s actually not a concept the game had until Season 2015. League of Legends game servers don’t have the models or art that you have when you play. The server actually sees things closer to this graphic (which is just a visual representation of some numbers it has): http://i.imgur.com/XJ1piby.png

The solution we arrived at for this was “...it should just know where the river is.” (Random advice to other game developers out there: it helps to have tools reflect the mental leaps of your players.)

So, we added more data to the map. http://i.imgur.com/GY9bLc1.png

This is what minions now use to figure out things like, “Hey, am I allowed to be here?”

There’s a couple subtle rules for this though.

  1. Minions can still attack things when those things are inside regions the minion itself isn’t allowed in. These minions won’t acquire new targets that are already there, however.
  2. Minions will drop all targets when that minion manages to get into the zone, even if that minion is already targeting something.

The minion can lock on to Ahri because she’s in an area marked as a lane. (Rule 1) (If Ahri was in the River, the minion wouldn’t be able to target her if it wasn’t already targeting her) http://i.imgur.com/UyFkx0j.png

It will continue to attack Ahri even when Ahri moves out of lane since it had already acquired her as a target. It will not acquire any new targets in the River however. (Rule 1) http://i.imgur.com/SKex3ED.png

Once the minion exits the lane itself, it will drop all targets and refuse to acquire anymore targets until it gets back into lane. (Rule 2) http://i.imgur.com/gEJwoXj.png

And with these behaviors we can clearly mark some zones minions aren’t allowed in: Jungle. River. Base Perimeter.

73 Comments

yoshi27908/25/2016, 7:09:15 PM6 votes

The only thing I really care about is minion block. And it should be reverted to how it was.

Joe Mana8/25/2016, 7:28:16 PM4 votes

[deleted]

Ashe Jungle8/26/2016, 10:44:18 AM4 votes

You are my hero. 4 years of this game and I have never understood the specifics of minion aggro.

Shinji10TH8/26/2016, 3:08:02 AM2 votes

I'm very displeased with the lack of puns, I expect more from you, Reina. [zombie-nunu-bummed]

Thanks for the insight, really interesting stuff*[slayer-pantheon-thumbs]*

Leonerdo8/26/2016, 5:22:47 AM2 votes

Call for Help. Minions ‘hear’ signals from nearby minions and champions being attacked (even by other minions). This causes them to recalculate their current target and prioritize the attacker that caused the Call for Help.

So minions call for help when hit by anything? Doesn't this mean the lane would be a cacophony of distress signals as the minions beat on each other? Clearly, I'm missing something. Is the call for help on a cooldown or something? Actually, if minions made calls for help at all, wouldn't that put more strain on the servers than the usual .25 second checks?

Unrelated to that, you didn't mention anything about how when minions acquire their target, they prioritize other minions, then towers, then champions. That is how it works, right?

Rhark5/3/2019, 7:21:12 PM2 votes

@Riot Reinboom My sincerest regard from a shaco main, i wish for you to overhaul the entire creep system, i have several issue's with this thread, it feels like creeps will choose one of what feels of an infinite pool of behaviour's, from taking a victory lap after killing one of my boxes and drawing a half circle the wrong way back to the lane creeps, to actual pathing to lane issues with no minion actually triggering my boxes except the very last ranged creep note that none had taken aggro or anything abnormal just walking to lane. I am very aware that AP shaco players are probably the only one actually depending on creep's mechanics to be absolutly on par, but i think everyone would have a greater time at all skill levels with transparent behavioural pattern's. If you would want to do me a huge favour you could actually try learning ap shaco as support it's actually where the flaw's shine the brightest. At an earlier point of the game the creeps felt more consistent, not appearent but consistent! Best wishes, probably every AP shaco player.

TerraRising8/25/2016, 7:50:24 PM2 votes

So... what rules besides "brainlessly attack nearest thing" do the New Yorick's minions follow?

Related question: What rules beyond "facetank the tower" does the Maiden of the Mist abide by?

Piltover Customs8/25/2016, 8:34:07 PM2 votes

@Riot Reinboom,

So I'm a Heimer Main (Long live our lord and savior). One of the things I have noticed is: If I'm standing in front of my turrets to grab aggro from the minions (so they do not attack the turrets and kill it off), most of the time (85%+ I would say) the minions will attack me once, then focus on the turrets (call to help maybe? even though I was attacking).

Scenario 1: 3 Turrets behind me, I'm 2 teemo's in front. I attack the minions as they come up and block their path to the turrets to keep them from dying. Minions attack me once then switch to turrets.

Scenario 1a: Same as Scenario 1 but they stay on me.

Scenario 2: I'm not in front of the turrets and the minions are wailing on them. I attack one minion, that minion switchs aggro to me, the rest keep attacking the turrets. I have to attack each one once to get it to me (No call to help)

Scenario 2a: Same as Scenario 2 but they all switch to me. (Call to help).

What should be happening here? What's the disconnect? All the scenario's have happened. They don't stay consistent.

HalcyonDweller8/22/2017, 5:09:44 PM2 votes

Hi Riot ReinBoom,

The minions appear to have an unpredictable interaction with the 'call for help' interrupt. I (and several others who post on the forums too) have noticed that the minions can switch targets seemingly randomly due to this, causing players to lose CS that would have otherwise been available to take for just a moment longer. Basically what happens is the cannon minion will switch targets and end up last-hitting cs before the player can take it because they were not expecting it to do that.

Is this intended or would you rather this didn't happen?

Deep Terror Nami8/25/2016, 6:38:34 PM2 votes

I'm not seeing the priority of "Build a minion wall high enough to keep the White Walkers, Wildlings, and you out", I think that's one of the first couple checks.

Edit: Jokes aside, I'd love to see a full image of the map with the grid shown in the last few images.

OG OriannaGrande2/23/2018, 4:40:10 PM1 votes

@Riot Reinboom If "minion block" is beneficial to the game and has a true purpose, yet we as players all (or almost all) agree that this phenomena is frustrating to tackle at the very least, why not make all champions immune to minion block. This would be like all champions having the phantom dancer passive by default. Then you may argue that this will minimize the appeal of purchasing said item, or nullifying Fizz's passive. Well to that I would say, perhaps it is time to rethink these mechanics and replace them with something not frustrating to play into.

Bigsnax8/22/2018, 3:13:15 PM1 votes

so ive noticed occasionally in my games if i attack a minion a couple times, my own minions will refocus to the one i am attacking. (im not sure if its necessarily because i attacked the minion) what part of the minion ai causes target switches and how can it be controlled?
by the way, side rant, i kind of wish devs would stop “fixing” “exploits” and just let players develop unintended strategies

I Just Press Q8/27/2016, 8:51:30 PM1 votes

So minions can have awesome first wave AI and other fancy AI stuff and circles and minion-go-in deny regions (jungle, river everything that is not lane), but Graves can't have his cigar? [zombie-nunu-tears]

Nicely done topic, very simplistic and well explained, you should add the "minion-block" information from the comments below to the actual topic. Everything is understandable perfectly! I even saw a comment where it said to add a new rule to the basic minion AI (after first wave) that if too many minions are close to each other and champion is close to them also (after certain amount of time 1/2/3 seconds) those minions run the rule that forces them to make space = to the current champion's hitbox to allow him to move through

True it isnt bad idea, but it could cause problems like allowing Amumu Blitzcrank Thresh to land their skillshot perfectly..

So here is what it comes in my mind, to prevent that make the rule in a way where the minions also consider champions path ( imagine a huge minion wave top lane, an ally champ has set his path to the turret to attack it minions detect that and make space for the champion [that will also increase high skill play as you can use minion block to your advantage, without having a disadvantage] of course enemy champions will not be able to get through [which could allow allied champions on those waves to play around with enemy champions.. so yea this idea might not work ._.]) Well I hope I provided basic idea to improving the winion's behaviour

Winions :3 http://imgur.com/ipaOPe6

Also shouts out for RHRealism and his awesome league content!

noose time8/23/2018, 9:34:48 AM1 votes

Have you considered adding a kind of fear mechanic to champion-minion interaction? Like if theres at least - lets say 5 minions - in collision or close to colliding with champions they could be forced to reposition themselves a little further away, or random 60% of the colliding minions to reposition?

Or having a movement test mechanic - if therere at least three minions colliding with the champion, check 8 directional movement of the champion, or in theory one direction with path finding would be enough to check if the champion is creep blocked. If he is move the colliding minions away or move 60% (randomly selected) of the colliding minions away.