DotA AutoScript 0.0.31 is released

Dota AutoScript version 0.0.31 is now available from the download page.

Changes include:

  • Removed the expiration date from the program.

DotA AutoScript 0.0.30 is released

Dota AutoScript version 0.0.30 is now available from the download page.

Changes include:

  • Added an audio reminder announcement when Rooftrellan’s ‘Eyes in the Forest’ ability completes cooldown.
  • Added hero support for Chen, AutoScript combos now include Penitence and Test of Faith.
  • Improved image recognition for inventory items. This includes a fix so that Ring of Regeneration is no longer confused with Necronomicon.

DotA AutoScript in the press

DotA AutoScript has been getting a fair amount of press lately. I wanted to link back to a few of the articles so that our readers can see what other people are saying about DotA AutoScript and participate in the discussions at these other websites:

  • A few days ago, the neural networks technical article written by Jon Tait made slashdot front-page news! We consider this to be one of the highest honors achievable for a techie project, and are proud of this achievement.
  • Gaming website “The Escapist” featured a column article about DotA AutoScript, How Your PC Can Make You Better at Warcraft. Here’s a quote from the article:

    Java developers have converted a neural network interface to act as a second pair of eyes while playing Warcraft. Defense of the Ancients is a scenario for Warcraft 3 that is heavily influenced by Starcraft, and the map “Aeon of Strife”. However, it does have a eye blistering array of differing spells to use, and micro-managing has been somewhat of a nightmare until now…

  • DotA AutoScript makes use of the Neuroph Java Neural Network Framework, and was highlighted in a recent post on the official Neuroph blog. The post mentions that some of the technology developed by the DotA AutoScript team for creating and managing Neuroph neural networks for image recognition has been contributed to the Neuroph open source project and will be included in the next Neuroph release.
  • Aurdon has written a blog post over at isheepthings.com that introduces DotA AutoScript to his audience. Aurdon has made many invaluable contributions to the DotA AutoScript project, so it is interesting to read his perspective on his World of Warcraft blog. One of the greatest things about having Aurdon involved in the project is his vast knowledge of World of Warcraft add-ons and their history. Someday we may bring the same technology behind DotA AutoScript to the World of Warcraft to improve a player’s situational awareness. For now, we’re working hard to perfect it on DotA, which is a more easily achievable goal.

A technology tutorial by Jon Tait

DotA AutoScript uses the Neuroph Java Neural Network Framework to perform image recognition from the video buffer in real-time to monitor a player’s inventory items and hero abilities while playing DotA. This information is used by DotA AutoScript to dynamically create hotkey binds and macros. Neural network technology was chosen for this task because of its ability to identify the game icons regardless of what screen resolution or graphics mode a player chooses to use. I wanted to discuss some of the technical details of this implementation for the benefit of people in the artificial intelligence community interested in working with neural networks and Java.

There are two different types of neural networks used by DotA AutoScript. The first type is a simple binary image classifier. It uses Neuroph’s “Multi-Layer Perceptron” class to model a neural network with an input neurons layer, one hidden neurons layer, and an output neurons layer. Exposing an image to the input layer neurons causes the output layer neurons to produce the probability of a match for each of the images it has been trained to identify; one trained image per output neuron. The output is “binary” in the sense that an image should be considered a complete match, or not at all. DotA AutoScript uses a threshold of 80% probability to confirm a match. Showing the neural network a picture of Paris Hilton will probably result in nearly zero percent matches for each output neuron, but showing it a picture of Aghanim’s Scepter may register as much as 90% match for the Dagon output neuron unless we teach it the difference, which will bring it down below the 80% threshold.
dagon input to neural network

paris hilton input to neural network

aghanims scepter input to neural network

The second type of neural network is an analog Multi-Layer Perceptron network with two hidden layers, and only a single neuron in the output layer. This neural network is used to identify the state of “cooldown” on any inventory item or hero ability that has passed the 80% threshold of the first neural network. An item which is cooling down cannot be used, and so should be rejected until has completely cooled down. This network is considered “analog” because its output is a range between 0 and 1. An output close to 1 means the game icon has quite a bit of cooldown time remaining, and a ready game icon will cause an output of 0. The following animated gif shows phase boots cooling down:

phaseboots cooldown

Amazingly, this second type of neural network only needs about a dozen item or ability training samples like the phase boots shown above in order to learn what cooldown behavior looks like and how to recognize it on items and abilities it hasn’t seen before. Through trial and error, I have found that the second hidden layer of neurons is vital to the neural network’s ability to “understand” cooldown images. I attribute this to the “analog” output we demand from it. Remember, in the first type of neural network we only need yes or no “boolean” answers if a game icon was recognized, so a single hidden layer was found to be adequate in trial and error neural network topology experiments.

Since a player can choose from many different screen resolutions, DotA AutoScript uses percentage coordinates rather than pixel coordinates for reading game icons on the screen, and each screen observation is down-sampled to a common 16×16 pixel resolution thumbnail.

game screenshot with sampled thumbnail

A 16×16 thumbnail contains 256 pixels, with each pixel describing 3 color channels (red, green, blue), making a total of 768 individual pieces of color information within a range of 0-255 (768 bytes). Thus, each image processing neural network must have an input layer composed of 768 neurons. This may sound like too large of a neural network, but the other layers in the network are much smaller, and we see in practical use that 768 input neurons is not prohibitively large for “real-time” calculations, especially when a caching scheme is added to the implementation. Each input neuron maps to a specific pixel and color channel, such that it inspects the same “location” in any image the neural network is exposed to. How the order of the color information is mapped to the order of the input neurons is unimportant, but what is important is that the mapping is consistent for every image that is exposed to the neural network.

Each input neuron requires that input values be formatted as a decimal falling in the range of 0-1. DotA AutoScript converts each byte of color information into this format by taking the color channel value between 0 and 255 and dividing it by 255, resulting in a decimal “fraction”, with each possible value consuming an equal range in the 0-1 spectrum.

A library of labeled training images was constructed using the following specifications for each game icon that needed to be recognized:

  • A stock game icon from the official website
  • An image of the game icon take from the game while running at 1024×768, 32 bit color, high texture detail
  • An image of the game icon take from the game while running at 800×600, 16 bit color, medium texture detail

Further, game icons that were not needed by DotA AutoScript, but were likely to be encountered, were also included in the library as negative samples. This prevented most cases of false-positively identifying a hero power or inventory item. In other words, the neural networks were also taught what not to identify.

The image libraries were then loaded into Neuroph’s “Tile Classification Suite” and used to create and train the appropriate neural networks. The smaller libraries may train in an hour or less time, whereas the largest image library can take 10 hours to train using momentum backpropagation, and even longer if regular backpropagation is used. After satisfactory connection weights have been discovered across the entire neural network, it is then serialized to a .ann file. After all the needed networks have been created via this process, they are packed into a jar file that is placed on the classpath for DotA AutoScript. DotA AutoScript deserializes the neural networks upon launch, and is able to use them, with the learned connection weights perfectly preserved, for real time image recognition.

neuroph tile classification suite

DotA AutoScript 0.0.29 is released

Version 0.0.29 is now available from the download page.

Changes include:

  • Changed the “Auto Phase Boots” feature to include Arcane Ring. It now looks like “Auto Phase Boots / Arcane Ring”. Enabling this feature will cause DotA AutoScript to activate your Phase Boots and Arcane Ring any time each has finish cooldown.
  • The “Auto Phase Boots / Arcane Ring” feature may interrupt cooldown spells, so the teleport boots / teleport scroll “Inventory Hotkey Binds” have been updated so that teleporting via these hotkeys will not be interrupted by the auto Phase Boots or Arcane Ring.

DotA AutoScript 0.0.28 is released

Version 0.0.28 is now available from the download page.

Changes include:

  • Added an “Auto Phase Boots” feature. Enabling this feature will cause DotA AutoScript to activate your phase boots any time they finish cooldown.
  • Added an audio announcement to remind you when “Hand of Midas” item finishes cooldown.
  • Added support for more items on the “Inventory Hotkey Binds” tab. New items include: Blink Dagger of Escape, Refresher Orb, Dust of Appearance, and Arcane Ring.

Here are the newest screenshots of DotA AutoScript:

AutoScript Tab
Inventory Hotkeys Binding Tab

DotA AutoScript 0.0.27 is released

Version 0.0.27 is now available from the download page.

Changes include:

  • Added a new tab where inventory items can be bound to a hotkey regardless of what slot they are in.
  • Added support for Medusa. Purge and Chain Lightning are now auto detected. Purge counts as a disable and will take priority before item disables such as guinsoos and diffusal blade.
  • Removed Malefice from Enigma hero support. Blackhole is now regarded as a disable, so that Midnight Pulse and Blackhole is the default combo for Enigma.
  • Removed Fiend’s Grip from Atropos hero support.
  • Removed Reaper’s Scythe from Necrolyte support because it often clashed in combos with disables such as guinsoos.

Here is a screenshot of the new inventory hotkeys binding tab:

Inventory Hotkeys Binding Tab

When Nobody Should Be Jungling

Due to fairly recent changes in the DotA map, taking down towers has a huge payoff and it is easier to do. The addition of siege creeps and a bounty reward of $200 per player on the aggressor team makes the towers a much bigger factor than they ever were before. The players who were paying attention adjusted the way they play the game. They realized that the first epoch of the match is won by the team who can bring down 3 of the opposing team’s towers first. If you can preserve all of your towers, and bring down each of the opposing outer towers, your team enjoys roughly $3,600 gold advantage, assuming no tower was denied. If only one tower was denied, the advantage is still close to $3,000 gold.

If an ally is jungling away despite the enemy team destroying the lanes, he has to single handedly farm $3,600 or more gold from the neutral creeps just to even the income difference between teams. Let’s assume he can clear an average of $180 gold per camp on average, he must kill 20 neutral creep camps in the time it takes the opposing team to bring down 3 towers. If his laning allies can buy about 25 minutes of time before folding, it may be worth it. But if the jungler is insensitive to the tower situation and continues his lone adventures while the lanes are wrecked, he will find he has a marginal advantage at best. The enemy team enjoys the extra map vision and “pushed” situation provided by their outer towers. They may roam as a pack more easily, using the outer towers as rally points. They control the river routes where the runes appear. They also have quick access to Roshan from their middle outer tower. In most cases, the defending team actually tends to fragment more as they defend the various pushed lanes.

Getting more from DotA practice time

Some people just DotA for fun. Others play to hone a skill set valued by league clans and the challenge of mastering the game. I consider myself more in the second category right now. Sure, it’s fun to pick Rikimaru and tear up an APEM game, but that isn’t really quality practice. Fortunately, there are many variables within your control that can make your pickup DotA pubs more relevant. Here are several that I have found:

Join RD pub games. No EM. No AR. No AP. The random draft game mode most closely resembles the captain’s mode game used in league play, in a “pub fiendly” fashion. The problem with EM (easy mode) is that the income for a player is so different. Consider a league player who kills 1 creep per minute in the first 30 minutes of the game. 1 minute of laning gets him 50 gold for the creep, and roughly 50 gold from the clock for a total of 100 gold. Time spent dead means his income is cut in half (without even considering gold lost from death). An EM player who can also farm 1 creep per minute will only be making 33% of his gold from creeping. He can run around or sit dead at the fountain and make almost the same amount of gold. A player who can farm twice as good will see an even bigger difference in regular mode.

Pick a hero that has a synergy with your teamates. Rikimaru, Clinkz, and Luna do not have a synergy. Tidehunter, Lich, and Sand King have a synergy. The most enjoyable and rewarding pub games I ever happen into have this feature in common: both sides have a strong hero synergy and work together to complete objectives. Every game, we always have the choice. Pick our favorite carry, or pick a hero that would look good on a clan match roster. Make your practice games about getting more comfortable with the synergy heroes. If you want fresh ideas, watch more league replays.

Buy observer wards. Even if you only do it once per game. After a couple weeks you will be used to ear-marking gold for wards and it won’t be so painful to do in league games. This also has the added benefit of making you the popular guy on your team! You’ll soon become comfortable with how and when you place your wards affects the game, and learn to do it better.

Time the runes. Every 2 minutes by the game clock, a rune will appear in the river, alternating between top and bottom, unless nobody picks it up. Develop an intuition for when and where the rune will appear so that you’re aware of it at all times. You’ll be amazed at how this changes the way you play!

Make it a point to be in every hero fight. If you die first, run back there if the fight is still happening. So many games are won simply by the team who had constant reinforcements at the battleground when their opponents did not. Over time you learn the ability to anticipate the fights by watching friends and foes move around on the minimap, and what has recently happened. Here’s an example: your team just scored 3 kills and was then repelled at the enemy base tower. They are all 5 together again, and fresh too. It’s a safe bet that they will counter right back up middle hoping that your team has scattered to farm, buy, and heal. Don’t let your team scatter when this happens!

Here is a link to the DotA League Masters 2009 Grand Finals replay. The match was played in Warcraft 3 version 1.22, but the replay has been converted to Warcraft 3 version 1.23 so that it may be viewed with the latest version that everybody is running.

Ks.Int was on the sentinel side of the map, and MYM on the scourge side. MYM got first pick.

MYM banned Naix, Spectre, Meepo, and Kunkka

Naix spectre, meepo, kunkka

Ks.Int banned Zues, Chen, Puck, and Ezalor.

zues chen puck ezalor

MYM chose Broodmother, Warlock, Sand King, Lina Inverse, and Rikimaru.

broodmother warlock sand king lina inverse rikimaru

Ks.Int chose Nerubian Assassin, Crystal Maiden, Krobelus, Tinker, and Earthshaker.

nerubian assassin crystal maiden krobelus tinker earthshaker

In the opening minutes of the game, the MYM players spent some money to upgrade their courier to a crow, while the Ks.Int players chose to wait to upgrade their lone courier. Interestingly, the Ks.Int players showed a preference to spend their starting cash on clarity potions, some carrying as many as 3. 4 out of the 5 Ks.Int heroes got clarity potions, the Crystal Maiden being the lone exception. Earthshaker carried a set of observer wards to the North lane, while MYM’s Broodmother carried a set of observer wards down the middle lane. No other heroes purchased observer wards with their starting cash. Many heroes chose to fill slots with Ironwood branches. Some of the more interesting starting item choices were Ring of Basilius on Broodmother, and 2 slippers of agility on Rikimaru.

The Earthshaker warded the scourge’s center lane ramp that leads to the rune so that they could easily observe rune snatching and approach to Fissure the center lane from above. He then ran north and encountered the Warlock while warding the north-western most scourge creep camp. A well placed Fissure allowed him to take nearly half of the Warlocks life. The Warlock ate a tango and spent quite a bit of mana using his heal until a second wave of creeps helped him chase the Earthshaker south to the river.

Broodmother warded the sentinel woods in two places: east of the mid tower, and a view of the river just east of the south rune spot. The first rune to spawn was a Regeneration Rune, and was snagged by the sentinel Nerubian assassin. The Earthshaker ran north into the woods and caught the Warlock off guard south of the scourge top tower.

Krobelus was the sentinel’s solo hero, taking the center lane. Supported by Lina Inverse, the Sand King made a bold move against Krob during the first and second waves, zipping in with an Impale to deal a damaging attack. The scourge’s solo player was Broodmother in the south lane, who was forced to hang way back while Crystal Maiden and Nerubian Assassin farmed the early waves.

MYM scored the second rune, an Invisibility in the south river. Lina picked it up while spending a healing salve to recover from a gank mid by Earthshaker, 2 minutes into the match. His earlier placement of a ward on the ramp helped him to time his Fissure, but after the gank failed to make first blood, he ran back north to assist the cornered Tinker. While invisible, Lina rushed the unsuspecting Krobelus, who was doing the creep dance against the Sand King. Opening with an Impale, then a Light Strike Array stun from the invisible Lina, Krobelus was first-blooded by the MYM mid squad.

Meanwhile in the sentinel bottom lane, the Crystal Maiden ran some sentry wards out with a creep wave so that she could nullify Broodmother’s webs. In an impressive performance, she lured the neutral creeps into the lane just as the wave arrived, picked up the sentry wards off the courier, and used the wave to clear the neutral creep camp in short order. It was an efficient and profitable venture, the kind of thing the pros do that make it look easy. Despite being the solo laner, Broodmother was out-leveled, at 3, by the Nerubian Assassin, at 4, and tied with the Crystal Maiden.

Krobelus was faring a little better as the solo laner. After teleporting back to the outer mid tower from the fountain, she was assisted by the level 1 Earthshaker and scored a kill against Lina Inverse. Both Sand King and Earth shaker ran north, each with only a sliver of life. Earthshaker decided to make a sacrifice out of himself to neutral creeps since he was deep in hostile territory. The Sand King made a better deal for himself: he quickly ran to the top lane and assisted in bringing down the Tinker. Riki was the bait, the Warlock let him fall to an inch of his life before using Shadow Word to heal him.

The score at 4 minutes into the match was 1 – 2, but it was slightly worse than the score suggests for Ks.Int because the Earthshaker died to neutral creeps. Shortly after, Nerubian Assassin and Crystal Maiden cornered Broodmother between her two bottom towers and killed her. Both escaped unscathed. By this point, the sentinel have upgraded their courier to a flying crow and used it to deliver magic bottles to Nerubian Assassin and Tinker. After getting his bottle, Nerub ran to mid, triple ganging Lina for the kill. Krobelus used her ult, and Earthshaker, still at level 2, used a Fissure to block off Lina’s escape. Sand King only survived by expending the last of his mana to Burrow Strike all the way up to the highest peak overlooking the north river. Fortunately for him, the sentinel had chosen to ward the scourge ramp instead of that high perch, which is a fan favorite. He sat there quite some time waiting for the -unstuck command to transport him back to the scourge fountain.

Shortly after, the Earthshaker headed north to help Tinker assail Riki and Warlock, who were both cornered at the scourge outer top tower. A suprise Fissure through the treeline caught them off guard, allowing Tinker to finish off the Warlock under the tower. Riki pushed out after the Warlock arrived to heal him, but the Earthshaker had another move ready. He put down a sentry ward and waited for the push in the river. Riki didn’t know he was observed, and a Fissure combined with Tinker’s attacks took him right out.

About a minute later, the sentinel made their first big power play, which was largely a repeat of what worked before: Krobelus Exorcism, Earthshaker Fissure, and Nerubian Assassin’s attacks. Krobelus was able to score a double kill on the struggling Lina and Sand King, and then bring down the scourge’s outer center tower. At 9:30 into the match, it was the first tower to fall.

At this point in the match, the sentinel team had a 4 level advantage over the scourge team even though they had the lowest level hero. The Earthshaker was level 4, but Krobelus and Tinker were both level 8. The scourge’s biggest hero was Broodmother, at level 7. The kill count was 6 for sentinel and 2 for scourge.

The sentinel continued to build momentum in the top lane when the Warlock targeted a hostile creep instead of the Tinker with Shadow Word as he was brought down to 42 health by Missile and Laser. Riki jumped onto Tinker at the same time, but it was too late for Warlock. Tinker finished him off, then turned his attention to the out-leveled Rikimaru, whose cloud was too little too late and barely escaped with his life.

Having brought down the scourge outer center tower, the sentinel team turned their attention to the side lines, leaving mid abandoned. Abuse on Warlock continued as he submitted to Tinker, and an assault through the tree-line by both Fissure and Nerubian Assassin’s Impale. It must have been a demoralizing affair for MYM’s top lane defenders. Help was on the way, and MYM was able to repel the attackers. Tinker fell to Rikimaru, but then died at the hands of Nerubian Assassin, who then died himself!

After regrouping, the sentinel renewed their assault, trading their bottom tower for the scourge’s top tower. 13 and a half minutes into the game, the score is 11-5, with the sentinel enjoying a tower advantage. MYM was never able to turn things around, and Ks.Int carried their momentum all the way to victory.

Looking for a reliable web hosting company? We found one.