Heroes of the Storm

Under the Hood: AI

Under the Hood: AI

AI is an important part of Heroes of the Storm. A significant number of games are played versus AI, and PvP games also have AI-controlled Heroes when players are disconnected. Those ever-helpful, ever-pesky minions and mercenaries are AI, too! We are passionate about bringing the best possible experience to all our players, so the AI team has been working hard on improving our AI systems. Read on for details!


What makes good AI?

There are many ways to define “good” AI, but from our perspective it’s an AI that closely matches players’ expectations. Minions and bosses need to be predictable. AI Heroes need to be very skillful. Players expect their AI Hero allies to stay safe, but also engage in team fights at the right time. There is a delicate balance between staying safe and capitalizing on opportunities. We also try to ensure the AI supports human players a little more than AI allies.

Valla Vaults into position for a Rain of Vengeance, but Stitches rescues the human player from annihilation!
Making good AI has its challenges. Many situations are complicated enough to have several valid strategies, and expectations can vary from player to player. We work closely with the game designers on our team to develop AI that models all the factors they consider important in decision making. And although we are trying to make the AI as smart as possible, we only give them access to information a regular player would have so they don’t get to cheat!

What is changing?

We are gradually transitioning the AI from being controlled by scripts to being controlled by several new systems built into the game engine. We are not trying to make the AI drastically different, but we are building systems that can be extended easily to add a lot more detail to the AI. You may notice AI Heroes being more responsive, more accurate, and executing more dynamic strategies.


Speed!

The new AI system runs many times faster than before. This has not only resulted in a slight improvement to the frame rate of the game, but it has also allowed us to update the AI more frequently! AI now have faster reaction times and they can use abilities in rapid succession. We had to drastically limit the update rate for lower difficulty AI!


Tactics

The tactics the new AI use has been enhanced to allow for a rich set of targeting options, and better positioning during fights. Examples are being able to predict the movement of targets, find clusters of targets, and filter or prioritize targets in many ways. Our designers have had a lot of fun using these new options to create more detailed AI. Kel’Thuzad’s surgical use of his abilities is a great example of this.

Rather than simply moving into range of their targets, AI Heroes also try to stay out of danger. They calculate a score for many locations around the target and move to the safest one.

The AI are also now able to stutter-step to keep attacking their target while moving into position.


Strategy

The AI has a new system for making strategic decisions. There are many things on a map that Heroes could be doing, and each of those is considered a potential goal for the AI. Each goal has a score calculated for it and the AI Heroes on a team are then assigned to the most suitable goal. This algorithm tries to maximize the team’s chances of winning by gaining experience in lane, taking mercenary camps, and controlling map objectives. It also looks out for lone enemies that can be easily ganked—so watch out!

Development

The team is constantly working on new Heroes, Battlegrounds, and game modes. To support this rapid development pace, we created an AI editor, which allows our game designers to quickly customize each Hero’s AI. This results in higher-quality AI that has been tuned for each Hero’s play style. You may notice this when Azmodan sees you at low health and throws a long-range Globe of Annihilation to finish you off!

A major part of the new AI is a “behavior tree” system, which is a common AI technology used in games. It is called a “tree” because it branches at every possible decision the AI can make, and the ends of the branches are the actual things that the AI can do, such as moving or attacking.

The branches of the tree are modular and can be customized for different AI behavior depending on the unit, map and game mode. This type of system is essential for supporting a diverse range of Heroes and Battlegrounds.

A very small number of the 400 nodes in Valla’s behavior tree.

Future

All Heroes released since Garrosh use the new system, and with each update of the game, more of the older Heroes are transitioned to the new system. We have plans for more improvements to AI systems too, including better danger avoidance, strategic decision making, and tactical behaviors. Please reach out on the forums with any feedback you have. We are determined to make our players’ experience with AI as enjoyable as possible.

Now, grab a friend and test your mettle versus the AI in the Nexus! Good luck.


Join Our Team!

If you are interested in working on projects like this, or in other areas of game development, check out our list of open positions here at Blizzard Entertainment using our official Careers site.

Next Article

  1. Hotfixes: March 27, 2024
    World of Warcraft
    9h

    Hotfixes: March 27, 2024

    Here you will find a list of hotfixes that address various issues related to World of Warcraft: Dragonflight, Wrath of the Lich King Classic, Burning Crusade Classic, Season of Discovery, and WoW Classic.

Featured News