Latest Posts

Topic: For those interested, I calculated the odds of fighting among level 10 soldiers.

king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1163
Ranking
One Elder of Players
Posted at: 2016-02-06, 11:21

I made a datasheet that can calculate the odds in the figth of level 10 soldiers. I think other people may be interested on the data.

In a clash between a fully promoted barbarian soldier and an atlantean one, the barbarian wins 36.2% of the times if it attacks first. If the atlantean attacks first, it has a 70.4% chance to win instead. Assuming that who makes the first attack is determined entirely by chance (50% each), the barbarian wins 32.9% of the times.

Between a barbarian and an imperial, the barbarian wins 40.3% of the times if it attacks first, and 33.2% if the imperial attacks first. The imperial has overall 63.3% chance to win.

Between an imperial and an atlantean, the imperial has a 49% chance to win if it ttacks first, and a 42.6% otherwise; overall, the odds are at 54.2% in favor of the atlantean.

For now I can't expand this to account for lesser soldiers; level 10 soldiers always need 5 hits to kill each other, but with lesser soldiers the variability on damage dealt means an uncertainty in the number of hits needed, and I can't deal with that.


Top Quote
DragonAtma
Avatar
Joined: 2014-09-14, 01:54
Posts: 254
Ranking
Tribe Member
Posted at: 2016-02-06, 21:50
The real problem is that upgrades need to be redone. Sure, the system is fine, but some upgrades are much more worthwhile than others; raising a Barbarian from 0 attack to 2 attack, for example, is more useful than raising form 2 attack to 5 attack, and much, much cheaper. I did some look at equipment stats for barbarians:

0->1 attack: +50% power (2 iron, 1 coal, 1 meat, 1 bread)
1->2 attack: +33.33% power (2 iron, 2 coal, 1 meat, 1 bread)
2->3 attack: +25% power (2 iron, 2 coal, 1 meat, 1 bread)
3->4 attack: +20% power (2 iron, 2 coal, 1 gold, 1 meat, 1 bread)
4->5 attack: +16.67% power (2 iron, 2 coal, 2 gold, 2 meat, 1 bread)
0->1 evade: +25% power (1 meat, 1 bread, 1 strong beer)
1->2 evade: +33.33% power (1 meat, 2 bread, 1 strong beer)
0->1 HP: +21.54% power (1 iron, 1 coal, 0.5 meat, 0.5 bread)
1->2 HP: +17.72% power (2 iron, 1 coal, 0.5 meat, 0.5 bread)
2->3 HP: +15.05% power (2 iron, 1 coal, 2 meat, 1 bread)

While I understand there being some falloff in effectiveness at higher levels, I think they may be a bit excessive here, especially for the attack (4->5 attack, for example, costs nearly twice as much as 0->1 attack, yet gives only a third of the benefit).

We also may want wider damage ranges at higher attacks. 12-16 attack varies a good bit, but 47-51 is very constant.

Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1163
Ranking
One Elder of Players
Posted at: 2016-02-06, 22:58

i think the levels are fine; the benefits are smaller when calculated as a percentage over the total stat, but the effectiveness of the soldier - the likelyhood the soldier will kill the opponent and go back to heal - are much bigger than a mere increase of 17% in damage.

For example, not upgrading the hp to level 3 means the atlantean would kill in 4 hits instead of 5. that would drop the barbarian's chances to win from 36.2% to 21.7% if it attacks first, and from 29.6% to 16.4% if it attacks second. A mere increase in power of 15% almost doubles the soldier's chance to win the duel - all those values can easily be obtained from my datasheet. So, it's well worth the money spent on it. Similarly, upgrading the attack from level 4 to 5 means killing in 5 hits instead of 6. I'd need to expand my datasheet to calculate how that would affect the odds, but it surely would be dramatic and would justify the cost of the upgrade. Heck, I demonstrated in the tournament how focusing all your resources into getting a handful of fully promoted soldiers will allow you to kill a big horde of mooks, one soldier at a time, without losing a single soldier. No, that's not something that needs to be rebalanced.

One thing I believe needs rebalancing is that the barbarian soldiers at level 10 are much weaker than anyone else's despite being more expensive. Barbarians are strong in early game, they pay for it with a weak late game, but I think less than one chance in three to kill an atlantean is a bit too much. Heck, an atlantean has almost one chance in 6 to kill 2 barbarian soldiers consecutively, without healing. On the other hand, that balance must not affect the early game, as barbarians are already too strong there - so no simply buffing evasion, it needs to be something else. I have a few ideas there, but first there must be some consensus on buffing barbarian soldiers at level 10. I was thinking of opening a new thread for that, and I made those calculations to prove my point. But anyway, I think somebody may be interested to add them to a wiki or something.


Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1025
Ranking
One Elder of Players
Location: Poland
Posted at: 2016-02-07, 07:57

I am thinking about adding some info to the wiki about that, but it is hard to tell how it should be done. Level 0 soldiers & level 10 soldiers are unequivocal. But level 9 soldiers has 3 choices for barbarians and empire and 4 choices for atlanteans. To make a full table with all possibilities... it takes lots of rows and columns.

I would like to add a table where we can add:

  • No promotion (lvl 0)
  • promotion with food only (lvl 2)
  • promotion with iron only
  • full promotion

That works with empire & barbarians, with atlanteans I have to think more about it face-smile.png But probably it will work fine too.

Also I can make a short script in one of open languages (python or lua which wll do the work for any situation :). Or your script (king_of_nowhere) is doing the job for any situation?


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/

Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 2807
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2016-02-07, 09:41

I agree that at level 10, chances should be pretty equal.

I think it's OK to have Barbarians a bit stronger than the other tribes in the early game (as long as they aren't totally OP), because that's the tribe that beginners are most likely to play.


Busy indexing nil values

Top Quote
DragonAtma
Avatar
Joined: 2014-09-14, 01:54
Posts: 254
Ranking
Tribe Member
Posted at: 2016-02-07, 10:23
Well, unless you changed things, barbarians are the weakest tribe, both at level 0 (2501.72, vs Empire's 2736.84 and Atlantean's 2872.34) and level 10 (24022.91, vs Empire's 27268.7 and Atlantean's 28668.7).

They're in the middle for goldless (14914.09, vs Empire's 16038.78 and Atlantean's 13081.4), but that's because Atlanteans can only reach level 6 without gold, while the other two can reach level 7.

Going by the Soldier Levels chart, these seem to be two main reasons why Barbarians are so weak:
* Although Barbarians are the only one with attack levels 5 instead of 4, (1) they start out tied with Atlanteans and Empire, and (2) they only gain +7 per attack level, while the other two gain +8 per attack level. As a result, level 10 Barbarians do an average of 49 damage, compared to 46 for the others (which is very little difference).
* Barbarians reach 55% evade rate, while the other two reach 62% and 64% evade rate. Not much difference, right? Wrong. Although the numbers seem fairly similar, it means a 45% hit rate vs barbarians, 38% vs empire, and 36% vs atlanteans -- which means that for each hit on Barbarians, one out of five attacks would miss the Atlanteans, and one out of six attacks would miss the Empire. For comparison, that would be as if Barbarians stayed at damage attack, while the other two dropped to 41 and 39 damage.

So if you want Barbarians to be the Zerg Rush tribe that's fine, but if you want them to match the other two in damage you'd have to boost them a bit.

And even if the tribes are considered balanced, I would recommend two changes:
(1) Give the higher attack levels more damage dispersal. Instead of +7~7 (Barbarians) and +8~8 (others) each attack level, I'd give +6~8 (Barbarians) and +7~9 (others); then top levels would be 42~56, 41~51, and 40~52 (instead of 47~51, 45~47, and 44~48)..
(2) Give soldiers a lower dodge boost, but also a boost to base accuracy boost. Also, given that Evade is also the only boost that doesn't need iron/gold/etc., I'd consider weakening evade boosts (so you may need four boosts to reach what currently needs only two boosts).

Top Quote
SirVer
Joined: 2009-02-19, 15:18
Posts: 1438
Ranking
One Elder of Players
Location: Germany - Munich
Posted at: 2016-02-07, 10:50

When balancing, I suggest mostly tweaking evade values - in my opinion they are the most frustrating and make the most perceived impact.

Also keep soldier cost in mind - I think a lvl 10 soldier does not need to be equally powerful, if they are also different in cost. You can build more of slightly weaker ones and still be fine. Size of biggest military building also makes a big impact: a 12 soldier atlanteans militarysite is easier to errect than a 12 soldier barbarians or empire building - which gives the atlanteans an edge IMHO. This can also be balanced by making their soldiers a bit weaker.

The situation is always very complex with balancing - alas we do not have thousands of played games to make a structured analysis, so gut feeling and number crunching is the best we can do - at least I have no better idea.


Top Quote
king_of_nowhere
Avatar
Joined: 2014-09-15, 18:35
Posts: 1163
Ranking
One Elder of Players
Posted at: 2016-02-07, 12:45

einstein13 wrote:

I am thinking about adding some info to the wiki about that, but it is hard to tell how it should be done. Level 0 soldiers & level 10 soldiers are unequivocal. But level 9 soldiers has 3 choices for barbarians and empire and 4 choices for atlanteans. To make a full table with all possibilities... it takes lots of rows and columns.

I would like to add a table where we can add:

  • No promotion (lvl 0)
  • promotion with food only (lvl 2)
  • promotion with iron only
  • full promotion

That works with empire & barbarians, with atlanteans I have to think more about it face-smile.png But probably it will work fine too.

Also I can make a short script in one of open languages (python or lua which wll do the work for any situation :). Or your script (king_of_nowhere) is doing the job for any situation?

No, my datasheet only works for two soldiers hitting each other a fixed amount of times. Taking two soldiers hitting each other in turn, I calculated the chances of each soldier hitting first - they are different depending on whoever hit first. then I built a probability tree with those events, ending when one soldier has hit the other 5 times. For example, I calculated that if the atlantean soldier attacks first, it has a 69.44% chance of delivering the next blow; so there are two branches on the tree, one leading to the scenario "barbarian-atlantean 4-5 (hits left), barbarian hits first' and the other leading to "5-4, atlantean hits first". the first scenario then leads with 55.6% pprobability to "4-4, atlantean first" and with 44.4% to "3-5, atlantean first". each scenario bifurcates, until one soldier is left at 0 hits left, and the cumulative probability is calculated. I can easily calculate any evade chance, and calculating a need for 4 hits only requires curtailing some branches of the tree. Adding the need for a 6th hit requires adding some branches, but it can be done. What I cannot really predict is when the number of hits required is variable. I would have to rethink the datasheet to account for that.

Ok, I think I have a way to do it, but it would take time, as I would need to calculate all the probability that a soldier would be killed with 10 hits, or 11, or 12. I'm currently busy with burocracy - I finished my PhD and moved from finland back to my native italy, so now I officially count as jobless and, until I have registered in the italian residence registry, I am even officially considered as homeless. If you give me a week or two I can givve you full percentages for every case. Otherwise, one of you programming guys can make a program that would run, like, one million simulations of soldiers in any condition, which will be less accurate but probably more useful than my datasheet.

EDIT: by the way, my idea for buffing barbarians would be to increase their attack bonus with promotion from +7 to +8. that would add up to a +5 damage at level 5, allowing them to kill an opponent in 4 hits instead of 5, which would bring the probability close to 50% - actually a bit more, around 52-53%, but it would be compensated because barbarian level 10 soldiers are more expensive. Alternatively, the same result could be achieved by adding a 6th tier of attack promotion. Barbarians are associated with huliing brutes with huge axes that can bisect a man in two and rip through heavy armor like it was paper, so them dealing more damage feels appropriate.

Edited: 2016-02-07, 13:06
Top Quote
einstein13
Avatar
Joined: 2013-07-29, 00:01
Posts: 1025
Ranking
One Elder of Players
Location: Poland
Posted at: 2016-02-07, 14:14

@king_of_nowhere:

In the past I've tried to make a simple program in Mathematica language solving any figth, and I remember that I mentioned that somewhere on the forum. But Mathematica is commercial language. I will do that in Python, but I have lots of "to do" things except that too. face-sad.png And about 2 hours a day for my hobbies (the rest is my son...) But I will do it! As soon as possible face-smile.png


einstein13
calculations & maps packages: http://wuatek.no-ip.org/~rak/widelands/

Top Quote