Skip to content

Dev Blog: Making a More Human Bot

Riot··2 votes·41,608 views

Hey all!

Welcome to another League of Legends dev blog entry. This time we’re taking a step away from the Gameplay team in order to talk about bots, which believe it or not inhabit a fair chunk of game time in League of Legends. We recently deployed a series of changes focused on making them more human-like opponents, and thought you might be interested in some of the stories behind the update.

As always, your feedback would be awesome as we build a better dev blog, but in the meantime let’s find out what goes into building a better, more human, bot! Stepping up to the podium we’ve got Design Analyst RoamingNumeral, one of the brains behind our bot update efforts. Onward!

Pwyff

Why did we update bots?

Bot matches make up a decent chunk of games, even among level 30 players. That’s a lot of hours spent with our robotic friends that we thought could be more engaging.

We surveyed both Coop-vs.-AI and PvP players to find out what they thought about bots. One very clear piece of feedback was a desire for more “human” bots: ones that are less predictable and focus on the same game elements that players do, such as last hitting and nailing their combos. Surprisingly, "tougher" bots was a less frequent response by comparison. Based on this data we set our sights on more-human bots as the overarching goal for this update, especially since such changes will make harder bots more interesting down the line.

Players also said that they thought bots didn’t seem to think about strength and danger the same way most players do. As it turns out, they were right.

Improving threat evaluation

Threat evaluation is our name for the systems that bots use to determine how strong they are and how strong their enemies are. These systems underpin all of the bots’ decisions throughout the game.

Our previous systems used a method that is very common in games, especially first-person shooters. The bot looks at how much damage has recently been received and uses that to determine future threat. In an FPS, this makes a lot of sense. If a bot walks around a corner and takes a bunch of damage, it'll probably keep taking that damage if it hangs around, so it’s best to back off.

League of Legends works a bit differently. If Veigar unloads all of his spells on a bot, and the bot survives, that isn’t the time for the bot to run. That’s the time for the bot to destroy that evil little @$!#!. Veigar has almost no damage potential while all his skills are on cooldown, so why not get a few shots, or maybe a lot of shots, in while he’s vulnerable?

Our new systems try to deal with these scenarios by looking not only at health but also how many spells the bot and any nearby enemies have available. Overall, we’ve seen some clear improvements in bot threat evaluation (much to Veigar’s sadness).

That said, improved threat evaluation isn’t a magic bullet for bots. League of Legends was built to be played by humans, not bots, and that comes with some interesting problems. For example, the game doesn’t really know what a spell is going to do before it’s cast. When Morgana’s Soul Shackles is cast, a script begins to run that constantly checks if anyone has broken the leash. When the spell finishes, the script says “Hey, you! You’re stunned and take damage” to everyone who didn’t break the leash. Before Morgana ulted, the game didn’t actually know that Soul Shackles deals damage and stuns.

Now, that may all sound obvious, but only because humans are able to read tooltips and think through scenarios ahead of time. As a result, the system can afford to figure out what a spell does as it executes. However, this is a huge problem for bots because they can’t read and don’t learn from experience.

Because of this, this update has to use some pretty rough estimation for how much damage champions can do. Bots will continue to sometimes go too hard or run from a fight they could win because they couldn’t perfectly calculate the damage involved…just like players :P

Why we didn’t do jungling and wall jumping

This boils down to one simple fact: bots don’t know where walls are or even what they are (really sucks to be a bot right?).

This is essentially the same challenge as spells: League was built to be played by humans. For a human, it’s obvious why a path is all curvy - there’s a wall in the way! A bot, on the other hand, just follows the autopathing it’s given. It doesn’t know where the wall is exactly or how thick the wall is; it doesn't even know that the obstacle is a wall. It could be a pile of minions. Bots just happily go along the shortest path from point to point provided to them by the pathing system.

Wall jumping with Flash or other abilities is thus extremely difficult for a bot - without knowing how thick a wall is or how to path to a narrow spot, it’s pretty much impossible to automate. A lot of under-the-hood tinkering with our terrain systems would be required to make these behaviors possible in the (far, far) future.

Jungling is a similar story. One of the primary keys to jungling well is choosing routes that are either safe or optimal for reasons other than pure distance. Without additional changes to our pathing and terrain systems we can’t make a jungler bot that would be more than a roaming pile of 300 gold served on a silver platter.

We definitely think both wall jumping and jungling would be awesome behaviors for bots, and in the future we’d like to explore ways to make bots proficient at them. For now though we chose to focus on other behaviors that would help make bots more broadly capable when combating players.

Dodging skill shots

One of the most noticeable differences between players and our previous bots was how they reacted to incoming skill shots. Players will try to dodge skill shots in most situations, but bots would often take incoming skill shots to the face without even flinching. Since this is a fairly non-human behavior, we really wanted to teach bots how to dodge. However, we ran into a pretty significant challenge (bet you can guess!) - just like terrain, bots can’t “see” skill shots.

This is what Nidalee’s Javelin Toss used to look like to Annie Bot:

Annie Bot Online…

Scanning…

Target: Nidalee

My HP: High

Target Q Available: Yes

Action: Farm to my mechanical heart’s content

-------------------

Scanning…

Target: Nidalee

My HP: High

Target Q Available: NO

Action: Farm some more

-------------------

Scanning…

Target: Nidalee

My HP: LOW

Target HP: High

Target Q Available: NO

Action: WTF!! WHERE’D MY HP GO?! NIDALEE OP, RITO PLS! (Run away)

Luckily for Annie Bot, Riot Case came up with a way to use information already available to bots to help them attempt to dodge skill shots. By keeping track of which way their opponents are facing as well as what skills have recently gone on cooldown, bots can now try to dodge skill shots in some cases.

This is what Javelin Toss looks like to Annie Bot after the update:

Annie Bot Online…

Scanning…

Target: Nidalee

My HP: High

Target Q Available: Yes

Action: Farm

-------------------

Scanning…

Target: Nidalee

My HP: High

Target Q Available: NO

[SPELL USAGE DETECTED]

Is Spell Skillshot: YES

Is Target Facing Me: YES

Action: DODGE LIKE A NINJA

-------------------

Scanning…

Target: Nidalee

My HP: High

Target Q Available: NO

Action: BREAK OUT THE BREAD AND CHEESE CUZ I’M GOING HAM! (Attack)

With this change, bots can now try to dodge skill shots…but it’s certainly not perfect. For instance, Anivia’s Flash Frost doesn’t go on cooldown until it travels full distance or is re-activated, so bots don’t know it’s been cast. Ahri’s Orb of Deception returns, so bots may dodge the orb on the way out but not on the way back. There are other abilities this system can’t quite handle yet, but dodging some skill shots is definitely better than dodging none!

Updating bot combos and builds

Aside from the trickier cases above, there was plenty we could do to humanize bots just by putting in some serious time - in particular, updating spell combos and item builds. Our quality assurance guy, Riot Afic, helped out immensely here with his Diamond-level knowledge, and the updated bots now use much more contemporary combos and build more sensible items.

On a related note, Annie Bot will now Flash-stun-Tibbers. Wear the appropriate undergarments.

More human bots

Unsurprisingly, bots that are trying to track many more variables are quite a bit more computationally intense. Our team’s engineers, RiotAaronMike and RiotWooTang, did a great job optimizing our code so we could ship this update without affecting server load.

A good opportunity for making bots both more efficient and more human-like was to contextually slow down how often they scan the environment and react. Beginner bots now scan at roughly one third the frequency they used to, while Intermediate bots scan anywhere from 50% to 100% as often depending on how threatened they are. None of these settings are what we would call “slow”, but they aren’t quite as fast as they used to be, which helps take a bit of the edge off those unrealistic super-human reactions.

These changes, and a plethora of additional under the-hood changes, have created what we feel are more human-like bots. They’re certainly not Diamond-level (probably not even Silver) - but for now that’s not what we were trying to do. Our next steps are to look for ways to build on the new bots and better tailor a Co-op vs. AI experience for players’ first few games. Look for more information on this next project soon!

RoamingNumeral

719 Comments

Wildings340 votes

Challenger Bots God help us.

Zerokzs28 votes

At least we are playing on NA. Just think of the Brazilian bots now.

Kirito SS429 votes

https://www.youtube.com/watch?v=TvTELkJa6-k

This is where Dyrus gets his ass kicked by Brazilian bots lol. I bet Faker is the one controlling Veigar Bot.

ZyniX157 votes

There was an idea floating around a while ago that suggested Riot release a bot team into ranked to see how far they could get. I doubt they would make it into challenger, but it would still be fun regardless.

Lord Moriuz71 votes

I think it was on reddit like a week ago (wouldn't really call it "a while").

But anyway, in the current state of (intermediate) bots: they wouldn't get too far (probably Bronze IV or III).

The reason is that, yes, they can burst you to death (Brand, Cassiopeia and Annie bot, I'm looking at you). They may end up having a better score than you do, sure. But even if they are in the lead, they won't take advantage of that.

If you start split-pushing properly or even having 4 teammates pushing a lane while another teammate distracts the rest of the bots, you'll end up winning.

Sometimes their logic is like "I just need to hit this inhibitor two more times in order to destroy it... Oh well, better teleport top to defend that outer turret! Maybe next time!"

SkyBluXIII10 votes

It may have been on Reddit a week ago, but that obviously doesn't mean it was the first time it was mentioned. The idea of sending bots into a ranked team to see how high they would climb has been around for years.

TheKappaChrist50 votes

Imagine what they've done to the Korean bots.

Scale Over Time10 votes

Please... I don't- I don't want to think about it.

LawlerRx135 votes

Are they going to harass one another then intentionally feed or afk? I think that'd be the most realistic

190030 votes

Bronze and Silver in a nutshell.

Azoth Vengeant15 votes

Actually, its pretty realistic, the enemy bots group while team bots refuse to help.

A Question Mark101 votes

Can we just be able to play intermediate bots in custom games XD

armadilluz30 votes

^this x10

DrugsWomenMoney85 votes

WTF!! WHERE’D MY HP GO?! NIDALEE OP, RITO PLS! LOMO hahha

ColonelDongPunch85 votes

Hello, riot and other inhabitants of the thread. First time poster. Quick idea about bot evasion and their ability (Or rather, lack there of) to jump walls. Instead of focusing on making the bots be able to determine what walls they can hop using an ability or flash, why not designate a group of 'emergency coordinates' where the walls are thin enough to flash around the map. Right now, it appears that in 'emergency ' situations (situations where the bots take a large ammound of damage in a short amount of time) they seem to just blindly run back towards their base. Instead, I suggest they run to these 'emergency coordinstes' and use their flash or abilities to jump the wall. In this way, they don't actually need to recognize the existence of the wall, just the point that represents a way to escape if they use flash or a similar ability.

Honestly, this seems like a very simple solution that if implemented would emulate human behavior much better.

RiotYpherion51 votes

This would be a solid start to a wall-jumping system.

The sheer number of coordinates that would be relevant is a bit scary, especially since it would depend on what ability you were trying to use. That said, this would get bots jumping over walls in at least some cases.

The hard part comes when you're trying to decide if it's a good idea to make the jump. If a player decides to jump a wall, they often then make clever decisions about an alternate escape route. Figuring out those escape routes and which are safe vs. not is pretty much the same problem space as getting jungling bots up and running. Once you're in the jungle, pathing becomes much, much more complicated. Shortest paths are often not best, whether to run away or try to join up with friendly champions...the list goes much longer and with each one the potential for derpy plays gets bigger and bigger.

Players are able to learn these decisions over many games, and eventually build mental check-lists that make reasonable decisions. Emulating this for bots is very challenging, so we decided to focus on places where we could get more done more quickly.

Easy Game Bro75 votes

They should make it where if one bot has more than 5 deaths the other bots should say "omg, report this bot for feeding" that would make the bots more "human"

4TeLaZRXVR60 votes

Action: BREAK OUT THE BREAD AND CHEESE CUZ I’M GOING HAM! (Attack) LOL PLZitem 3136

Catbüg55 votes

Damn now even the bots can dodge skillshots... I need to step up my game...

ADC IN 2020 LMAO52 votes

"On a related note, Annie Bot will now Flash-stun-Tibbers. Wear the appropriate undergarments." RITO PLZ

Strommsawyer37 votes

They should do a bot experiment. 5 separate bots, disguised as real players, in ranked. Run them 24/7 for like a week, and see where they end up in solo que ranked.

fergy40534 votes

Maybe now shen bot won't rush brutalizer.

leeflang34 votes

being that this is about bots and all, i have a question and request.

one day, while playing a bot game, i had a simple question/idea about bots that popped into my brain, when i play bots, my team is always on the "blue" side, however, when playing PVP i sometimes will be placed on the "purple" side which sometimes throws me off a little, and so, i was wondering if it's too much to do a randomize system in bots like it is in PVP, which puts the bots on blue every once in a while, and the actual players on purple.

SlayerAus32 votes

Soo..... Bots can dodge skillshots..... Bots are now better than all of bronze V

Prouster29 votes

"WTF!! WHERE’D MY HP GO?! NIDALEE OP, RITO PLS! (Run away)"... I know that feeling poor little bot champ; I know that feeling...

UnknownMartian28 votes

You should disguise yourself as bots in random games. Do something crazy and interesting. Get a full rito group and play as the bots and at the end offer the newbies some help and award some if you see them being super cool dudes.

Twëx13 votes

I'm sure the casual players would appreciate getting absolutely ANNIHILATED in what they perceived was going to be a normal bot game. Lol.

Noobly10128 votes

Congratulations, bots! You have successfully been promoted from Cardboard V to Bronze V. Yeah. Yeah....

Saltine Cracker32 votes

They were all "Lagging" as they claimed.

Curse of Royal24 votes

Great idea updating the bots riot! Have you considered putting in a feature that would make them respond to pings?Cassiopeia

WuPwns22 votes

" BREAK OUT THE BREAD AND CHEESE CUZ I’M GOING HAM!" I once said that and got a very offensive response from a teammate saying only trolls say that.. that makes two of us! Riot gg

Aizera17 votes

Deer Rito,

I just tested the new co-op playing as Lux and bring out some initial feedback. Even though bots are still imperfect, I think it is a very good improvement compared to the old AI. :) Here are some things that I noticed about skillshot dodging:

The sidestepping is actually very, very impressive. When I was under level 20 I cannot even sidestep like that -_- and I sometimes still get pwned even now. So I think that was a really awesome change.

Here's a thing though. In your particular code you mentioned: "is the target facing my way, yes, then dodge like a ninja"--- so I went into the game, and I find that bots are easily kited, since they do not bother to dodge my Q when I'm running the hell away and my champion is not facing them.

And some other things, there is umm skillshot baiting. If bots just recently dodged a skillshot, they cannot sidestep a second skillshot. I'm sure you guys are on it ;3

Bots also do not register lux ultimate as a skillshot ... yet o_o

Also maybe there are some small bugs. Garen bot ran across my tower while I'm kiting him. >_> Just a minor thing though.

Anyways, for a closing letter, thanks so much for making this change, and I really hope the feedback helps since I'm very excited about the improvements you guys are making. :3

Thanks! Kai <3

----x---- Deer rito peeps,

I know I should have posted it earlier but I forgot, but thanks so much for making the new support items (especially the new FQC), and nerfing all the champs that used to facepwn me xD

And for nerfing Leona & Lulu! ILY<3

Sincerely, A Diehard Nami Fan [also,for creating this champion.]

TacticalEevee15 votes

WTF!! WHERE’D MY HP GO?! Nidalee OP, RITO PLS! (Run away)

Sooo many lolz

FORESKlN JANNA15 votes

Will be ever be able to play intermediate bots in custom games?

Akrasias15 votes

Can you fix omniscient Karthus bot?

Entity Zero13 votes

I feel like jungling is possible, its just too much work. Id start the script by checking if Red buff or Blue buff is the optimal start from that champ, and have them go to each camp based off of if the camp is shown to be alive on the minimap or not. If they go to a camp thats been counter jungled, then they take a step back in the script and check which camp is next. As for ganking, they can determine if an enemy in lane is pushed past a mid point or not and take a few other factors in like their location in relation to the enemy and if its a good idea to go gank based off that information.

RiotYpherion19 votes

This is a good summary of the initial work we'd need to do to get jungling going, but it's not the end of the story.

Humans are good at playing mind games, learning patterns and deciding how to adapt. Adapting to enemy team play is extremely important for a jungler, and that's very challenging for bots.

For example, if we scripted that bots should do Blue->Wolves->Red->Wraiths etc, collapsing on that bot on their way to Red is very easy; a player would learn from this, making a bot learn this is very challenging.

Another example: if bots gank extended lanes, setting traps etc becomes very easy. Again, players would learn, but bots would have trouble.

Because of this, a jungler bot would be super fun for a few games while players figured out the patterns, but after that the predictability would be a bit of a buzz kill.

It is POSSIBLE to create jungle bots that are compelling and adaptable, but as you pointed out, it's a lot of (very fun) work. We had to make a call where to focus, and we decided to focus on solid behaviors in broader areas. That said, the team has had many conversations about wishing for jungle bots :P.

kTGg8TYecZ13 votes

Played a bot match a while ago and noticed the bots came to lane before minions spawned. I was like "what? never seen that before!"

This explains it.

nathanxyz13 votes

Could you possibly also make their autopathing include more bushes? It's odd to see a bot just casually strolling toward you, rather than skulking up through the shadows like a human should

Raymuundoo12 votes

Annie summoner 4 Stun tibbers....... f**k bots are gonna start having a lot more fun

WontBeBanned12 votes

Velkoz I have studied, analyzed and rearranged the the lettering so that all i saw was " Burn Teemo burn." and i only have this to say: Thank You Riot.

viperden12 votes

No more beginner bots nor intermediate bots. It's only Diamond bots or Challenger Bots.

CamiIIe Bot11 votes

Can't wait to get beat by bots :D

Sighfull9 votes

Seeing Ryze dodge Jinx's Zap just puts a smile one my face...Amazing update riot :D

Physics The Wolf9 votes

Oh no.... summoner 4 Annie summoner 4 Annie summoner 4 Annie summoner 4 Annie summoner 4 Annie summoner 4 Annie

Ryot God8 votes

Someone else in the comments had a really good idea. In Co-op vs AI the humans always play blue side. A lot of people new to PVP have trouble playing purple side, because of a lack of practice. I think the human team on Co-op vs AI should be assigned to purple side for half the games to better represent actual gameplay.

RiotYpherion17 votes

This change is in testing on PBE now :). Bots have a 50% chance of playing each side.

Jiejl4 votes

Please don't let people that are a low level and are new to the game play intermediate bots. I have lost because of scrubs like them.

mærk20 votes

"Scrubs"?

Why not just simply carry the game then, go someone who cant 1v5 or snowball later game. Besides most people play Bots because its fun and learning environment for them. Don't deny them of that.

PuppingCaps13 votes

Well, I don't agree with not letting beginners play with Intermediate bots, but I have lost games because people didn't understand what they were doing, or were new to the game but felt the need to act cocky when they've already died 12 times. I guess all I want to say is that I understand the annoyance and that's something I have to deal with sometimes as well, but I agree- it is a great learning environment. Except for the moment you find out your team is a new and you're playing support... No carrying for you!

More from Announcements