*Note: The data is up to 05/05/2022, some changes may occur since Dota2 is always updating.
We put the classes and functions in main_final.py, and main function in for_running.py. You should be able to run the for_running.py directly, get the summaries in console and show plots.
If there is anything wrong, please contact us:
[email protected], Beihua Wang
[email protected], Billhonam Wong
This is a simulation of a duel in a game background. Battle Of Mirkwood is a Role Play Game based on Dota2. Hundreds of neutral creatures wander throughout the whole map. The neutral creatures will grant hero Skill Books which can be consumed to learn a new skill or improve the skill level by one level for each Skill Book consumed. Players will encounter each other; this is where the duel happens. The duel might happen throughout the game, and the player who achieves 80 Player Kills first wins the game.
Each hero has different attributes: Damage, Attack Speed, Hit Point (HP), Armor and so on. Details see Appendix. Since there are too many models in the game which will unnecessarily complicate the simulation, we will set the model to Monkey King.
Since spells are too complicated to simulate, we only consider passive skills. Each hero can learn 2 main passive skills and 4 sub passive skills.
The max level for a main skill is 4, the skill level cannot exceed (1+hero’s level) / 2. The level of main skills grow as the level of the hero grows. In the simulation, it is totally randomly selected.
The max level for a sub skill is 10, the skill level cannot exceed the hero’s level. Killing the neutral creatures will grant hero Skill Books. Each Skill Book is bounded to a specific Sub Skill. Consuming a Skill Book can grant hero that Sub Skill. If the hero has already learned that Sub Skill, each Skill Book consumed will improve one skill level of that Sub Skill. For example, if a hero consumed 7 Skill Book-Armor Improving, he will have a Level 7 Sub Skill Armor Improving.
There are various items in the game, which makes it impossible to simulate. Thus, we will simulate the duel only selected items, includes: Monkey King Bar, Heart of Tarrasque and so on.
Hero models & items --- The attributes for each hero model and each item are set by Dota2.
Skill Effects --- The effect of each skill is set according to the RPG game as shown on last slide.
Items --- The hero will equip what set of items.
Hero Model and Hero Level --- Which hero model the simulation will actually use and the hero level are manually set.
Amount of Skill Books --- How many amount of skill books the Hero will get is manually set.
We have four main hypotheses:
We believe the Evasion is the best sub skill, and the Monkey king bar has an eighty percent chance to pierce through Evasion, so it will make the wining rate of Evasion decrease greatly. Third, in an earlier stage, heroes have less hit point, the duel will have fewer attack rounds and time, so the importance of different sub skills will change. Last, the importance of different main skills will also change because of the hero attributes growth in different stages.
To easier test hypotheses 1&2, we controlled the two hero models both level 15 monkey king, learned 60 skill books and same one main skill "JinGu Mastery", the upper screenshot shows the duel result of the two heroes without MKB, the lower one shows the result with MKB, when we calculate the winning rate of each skill, we removed the record that both two heroes learn that skill.
Then we compare the winning rate in a bar chart:
From the blue bar we can see, if a hero does not equip the MKB, the evasion is the strongest sub skill. And there is a huge difference when the hero equips the MKB, this can prove both two hypotheses are correct. And we can also know, when heroes can’t evade damage, the skills "attribute bonus" and "damage bonus" become more important.
We still controlled the two hero models both monkey king and one main skill "JinGu Mastery", but one is level 15 with 50 skill books, the other one is level 6 with 20 skill books, then we also compare the winning rate in a bar chart:
There it not an obvious difference at different stages, except "damage bonus" and "curse of death", this make sense, because in an earlier stage with lower hit point and less attack rounds, a lot of skills are not triggered for many times, so the power of "damage bonus" is simpler and more direct, and the "curse of death" deal damage per second, so with less attack rounds and total time in an earlier stage, it has poor effect. The hypothesis 3 is partially correct.
To test Hypothesis 4, we changed the two heroes to BountyHunter, they learn the main skills randomly, the upper screenshot shows the duel result of two level 15 heroes, the lower one shows the result of two level 6 heroes.
Compare main skills in the plot:
In the early stage of level 6, the attack damage of heroes is generally low, and critical benefits is extremely low, while the "JinGu Mastery" can provide a high attack damage bonus. At level 15, as the hero level increases, the importance of the additional attack damage provided by "JinGu Mastery" is reduced, although it is still ahead but loses its absolute leading position. However, the hypothesis 4 is wrong, the importance of main skills don't change a lot.
Reduce physical damage the hero takes.
(Source: https://liquipedia.net/dota2/Armor)
Reduces Magical damage the hero takes.
All the heroes have a 25% basic Magic Resistance. Since the item system is limited, there is no way to improve magic resistance in this model.
(Source: https://liquipedia.net/dota2/Magic_Resistance)
Strength increases maximum health and health regeneration while Agility increases armor and attack speed. If Strength or Agility is the main attribute (primary attribute), it will also increase damage.
Each Strength gives: +20 Health (Hit Points), +0.1 Health Regeneration
Each Agility gives: +0.16 Armor, +1 Attack Speed
Attack Interval = Base Attack Time ÷ (1 + (Increased Attack Speed ÷ 100))
(Source: https://liquipedia.net/dota2/Attack_Speed)
Physical Damage: Will be compromised by Physical Resistance, related to Armor.
Magic Damage: WIll be compromised by Magic Resistance
True Damage: Will not be compromised by anything.
Sub-skills are the skills gained by consuming Skill Books. These skills are defined by the RPG game, not Dota2 itself.
Main Skills are set by Dota2. The main skills implemented includes:
This is a skill of Monkey King in Dota2 (https://liquipedia.net/dota2/Monkey_King).
- Upon the fourth hit on the same enemy hero, Monkey King earns four charged attacks that have bonus damage and life steal.
Feast (Skill of Life Stealer in Dota2 https://liquipedia.net/dota2/Lifestealer)
Moment of Courage (Skill of Legion Commander in Dota2 https://liquipedia.net/dota2/Legion_Commander)
Coup De Grace (Skill of Phantom Assassin in Dota2 https://liquipedia.net/dota2/Phantom_Assassin)
Grow (Skill of Tiny in Dota2 https://liquipedia.net/dota2/Tiny)
(Source: https://liquipedia.net/dota2/Monkey_King)
Life Stealer (https://liquipedia.net/dota2/Lifestealer)
Bounty Hunter (https://liquipedia.net/dota2/Bounty_Hunter)
Treant Protector (https://liquipedia.net/dota2/Treant_Protector)
Damage + 40, Attack Speed + 45. Grants each attack an 80% chance to pierce through evasion and deal 70 bonus magical damage.
(Source: https://liquipedia.net/dota2/Monkey_King_Bar)
Strength + 45, Health+ 250, Health Regen+ 1.6% Max Health Regen
(Source: https://liquipedia.net/dota2/Heart_of_Tarrasque)
Strength + 25, Damage + 45, Life Steal + 25%
(Source: https://liquipedia.net/dota2/Satanic)