Your goal is to code a bot that faces the built-in AI. The challenge is to destroy the Dire’s Ancient as fast as possible!
Remember that you can choose the heroes that your AI will control. So, get familiar with the available heroes by:
- Playing Dota 2!
- Checking the official hero info: https://www.dota2.com/heroes/?l=english
- Getting familiar with the internal names for all heroes: https://developer.valvesoftware.com/wiki/Dota_2_Workshop_Tools/Scripting/Heroes_internal_names
Designing a strategy!
Once you’ve chosen heroes for your party, you should get familiar with how to use their abilities (and talents) from the framework. For this:
- Check the abilities internal names (sorted by hero): https://developer.valvesoftware.com/wiki/Dota_2_Workshop_Tools/Scripting/Built-In_Ability_Names
- Check how to cast all different types of abilities (and talents) from the framework:
- “TestBotBasicSmart.py” gives you a general idea.
- Other built-in bots placed inside “src/bots/test_bots” test available abilities and strategies on several scenarios.
Attack!
Your bots are expected to attack. A lot. Get used to doing this from the framework:
- Check the built-in names for all (non-hero) units in the game, including all types of towers and creeps! https://developer.valvesoftware.com/wiki/Dota_2_Workshop_Tools/Scripting/Built-In_Unit_Names
- Make sure to understand how to look for targets.
- Double-check methods for calculating distances in World.py.
- Use a good mix of abilities and basic attacks!
Killing blow and Deny
Killing creeps and heroes rewards opponent heroes with Gold and Experience.
- Gold lets heroes purchase items at the shops. It’s ONLY rewarded to the hero that delivers the KILLING BLOW to the creep. Heroes also get gold at a 0,63 gold/second base rate.
- Experience lets heroes upgrade. It’s rewarded evenly to all opponent heroes close (1500 radius) to the killed creep or hero.
Players can DENY enemies from delivering the KILLING BLOW to an ally creep/hero, by killing it themselves. If I deny one of my creeps, the enemies get only half the experience and no gold.
Keep in mind that KILLING BLOW and DENY are two key Dota 2 tactics.
Buying items
Heroes can buy items from the shops with gold, in-person or by means of the courier. Per team, there is a base shop close to each Ancient, and a secret shop in the Jungle. Buying and equipping items is as important (if not more) than levelling up and upgrading, hence the importance of delivering the KILLING BLOW and DENYING.
When killed, heroes lose the gold they obtained from killed creeps and enemy heroes (unreliable gold). Getting killed makes heroes lose gold and stay out of the game for a while, hence the importance of not getting killed.
Therefore:
- Get familiar with all purchasable items and when/how to buy them: https://dota2.gamepedia.com/Items
- Make sure that you understand the differences between all types of items and how to use them.
- Check built-in names for all items: https://developer.valvesoftware.com/wiki/Dota_2_Workshop_Tools/Scripting/Built-In_Item_Names
- Get familiar with how the recipe system works! https://dota2.gamepedia.com/Recipe
Experience and level up
Heroes upgrade (level up) every time they gain a given amount of experience. Levelling up increases the hero’s stats and lets the player choose or upgrade one of the 4 available unique hero abilities.
Getting to know your hero’s abilities (and talents) and how to use them is key.
When killed, heroes never lose experience or levels, and they get respawned next to their ancients after a considerable delay (depending on level).
Additional notes
Dota 2 is an alive, vibrant, and very active online community!
The International runs from 2011 (except 2020): https://www.dota2.com/international/overview/
There are lots of websites where players post and discuss hero “builds”, strategies, guides, etc. E.g. https://www.dotafire.com/dota-2/guides?sort_type=score_decayed&threshold=guides
On the downside, the community has a strong lingo and technical concepts that you should get familiar with. Here’s a nice summary: https://www.rockpapershotgun.com/2015/02/11/beginners-glossary-dota-2/