Hole Premium um die Werbung zu unterdrücken
Beiträge: 19   Besucht von: 144 users
03.02.2014 - 22:10
[EDIT]
1. Deals with 'no win' problem noted by Cthulu by taking all situation where both units in the final skirmish eliminate each other by granting the unit with the highest HP at the end of the skirmish (0HP is the highest possible) the win status. As this is merely a guess, when both units die, and die with the same HP, those instances are judged 'unknown'.

2. Results updated with spillover damage as directed by AlexMeza

After developing a simple battle-calculator, I've put it to use generating expected outcomes for attacker and defender scenarios. I'll update this particular post as I run more scenarios. I'll post in order of usefulness (1v1, 8v8, Tanks vs Infantry etc.)

8v7 Updated to most accurate version available.



Takeaways:
0. Units defending a city are successful even if they die in the attempt, so long as all attackers are destroyed.
1. Units attacking a city are NOT successful unless they have at least one unit remaining to occupy the city.
2. 1v1, Tanks often fail against infantry. In a 1v1, to occupy a city, tanks fail 3 out of 5 times!
3. Even at 95% confidence, a unit will still fail 1 out of 20 times. With 99.5% confidence the unit will still fail 1 out of 200 times.
4. At 8v8, adding one tank (9v8) boosts your chances of victory significantly, adding two tanks (10vs8) is a decent boost, but the third tank (11v8) isn't much of a boost, and not worth it if there is an alternate use for it, unless you're recapturing your cap.
Lade...
Lade...
03.02.2014 - 22:27
Methodology:
1. I began with the AtWar Battle Mechanics page: http://atwar-game.com/home/faq.php?faq_id=17, and refined my approach after AlexMeza reviewed my assumptions (I was calculating Critical Damage incorrectly).

2. Once each units' Max Attack or Defense Strength and Critical has been determined, I plug these in to my Battle Simulator. Every round in every skirmish in every battle is calculated individually. If the unit has 8 Max Damage, 7 HP and 5 Critical, the basic damage is ( for example) randomly determined (1-8), critical is rolled and if 5% or less, the Max Damage is added to the basic damage. Hit Points are adjusted, and if both units in the current skirmish have >0 HP, the fight continues.
If a unit survives the skirmish, it fights, with diminished HP, against the next unit. Skirmishes continue until there are no more Attackers or Defenders.

3. Expected Average Damage, and Expected Critical were used as the checksums against my algorithm. The Expected Critical doesn't require calculation (usually 5%) and the Expected Average Damage is a trivial calculation (see below).
After ten million iterations (later 100,000) if the simulated Critical and Average Damage were not within tolerable range of the Expected Average Damage or Expected Critical %, there was likely something wrong with my procedure or my RNG.

4. Units killed, damage delivered, the number of successful Critical rolls, and surviving the battle are all metrics captured for comparison at the end of the scenario.

5. No result is posted unless at least 100,000 battles were simulated (the difference in overall results between 10,000,000 and 100,000 was <.5% for each measurable element. At fewer than 100,000 battles, confidence in results began to drop. At 1,000 battles variances from expected were significant (and demonstrates that anecdotal observation of game results may not be demonstrably reliable).

6. Raw results for any battle set are available on request, as is a more detailed explanation of my approach. Published results are rounded to the nearest 1/100th.

7. Current results are only useful for obtaining overall results for a clear attack on a defender (where one unit attacks another; the other unit never attacked the first) and will not apply when two units attack one another. These results are very useful in Turn 1 openings (attacking units in cities) or other scenarios were the attacking units are not counter-attacked in the same turn.

8. In terms of calculating results, a Battle is over when either All Attackers or All Defenders (or both) are destroyed. A Skirmish is completed when either an attacker or a defender (or both) are destroyed. A round of combat is where both an Attacker and Defender roll for critical damage, add to this their normal damage roll, and damage is subtracted from their current HP. If both have HP >0, another round commences.
---
Calculation of Critical and Average Damage and use as a Checksum
- Critical is merely the % chance out of 100 that a unit will deliver a critical blow. Usually this is 5%.
- A unit's Average Damage is the statistical mean damage that a unit will produce over the long run.
Using a unit with 8 Max Attack and 5 Critical as an example, before Critical, the unit will incur 4.5 Average Damage. This is calculated by adding up all the integers between 1 and 8 inclusive, and dividing by 8 (1+2+3+...7+8) = 36. 36 / 8 = 4.5
The Average Critical Damage was calculated by multiplying the Max Damage (8) by the probability of a critical hit (5%) 8*.05 = .04. 4.5 + .04 = 4.9
- While the battle simulator runs, it tracks the number of critical hits delivered by an attacker and a defender, and the aggregate damage each unit delivers to another, as well as the number of rounds completed.
- At the end of the run (100,000 battles of 1v1 Tank vs Infantry is about 165,000 rounds) the actual damage done by each unit is divided by the number of rounds, and the actual number of critical hits simulated is also divided by the number of rounds to provide Average Damage and Average number of Critical Hits. If the simulated Average Damage done by Attackers and Defenders, or the simulated number of Critical Hits varies significantly from the expected Average, further investigation into the process is merited, or the number of simulated battles needs to be increased.

Example Results and Deviations. 1 Tank v 1 Infantry Expected Critical is 5% for each. Tank expected average damage is 4.9, Infantry is 4.35.
1000 battles:
- Attackers do 4.8339372 damage, Defenders do 4.40036232, a max deviation of >1.5% from expected.
- Attackers deliver 4.52898551% critical hits, Defenders deliver 4.95169082%. The attacker critical hit rate deviates by > 9%
100,000 battles:
- Attackers do 4.89206314 damage, Defenders do 4.34189531, a max deviation of <.19% from expected.
- Attackers deliver 5.0550934% critical hits, Defenders deliver 5.05752578%. The attacker critical hit rate max deviates by <1.2%
Ten Million battles:
- Attackers do 4.88823182 damage, Defenders do 4.33920439, a max deviation of <.25% from expected.
- Attackers deliver 5.04163131% critical hits, Defenders deliver 5.02946495%. The attacker critical hit rate deviates by <1.1%

The difference in confidence between the results of the 100 000 and the 10 000 000 battle results is small, and probably 100 000 000 battles would need to be run to get us results as close to the Markov-chain exhaustion as out pseudo RNGs will permit us.
Lade...
Lade...
04.02.2014 - 11:28
I'll stick to my gut.
----
"Do not pray for an easy life, pray for the strength to endure a difficult one"
Lade...
Lade...
04.02.2014 - 11:53
AlexMeza
Konto gelöscht
Wow this thread is so long
Hmm, is this roll-based?
Hehe, don't do too much calcs I don't want everyone to have top secret info ;_;
Lade...
Lade...
04.02.2014 - 11:59
Geschrieben von Dr Lecter, 04.02.2014 at 11:28

I'll stick to my gut.

The broad masses of AtWar are not made up of professors and diplomats. Since these masses have only a poor acquaintance with abstract ideas, their reactions lie more in the domain of the feelings, where the roots of their positive as well as their negative attitudes are implanted.
Lade...
Lade...
04.02.2014 - 12:03
Geschrieben von Guest, 04.02.2014 at 11:53

Wow this thread is so long
Hmm, is this roll-based?
Hehe, don't do too much calcs I don't want everyone to have top secret info ;_;

The 'methodology part' is very long -- I want people (like you) to look for flaws in my procedures or reasoning so I can fix them!

Every round of combat was roll-based, but using the built-in Visual Basic RNG ... which is good enough for most purposes, but if I was doing this stuff as a scientist or a mathematician I'd be using a subscription service-based RNG/cosmic-ray device etc.
Lade...
Lade...
04.02.2014 - 12:10
AlexMeza
Konto gelöscht
Geschrieben von zombieyeti, 04.02.2014 at 12:03

Geschrieben von Guest, 04.02.2014 at 11:53

Wow this thread is so long
Hmm, is this roll-based?
Hehe, don't do too much calcs I don't want everyone to have top secret info ;_;

The 'methodology part' is very long -- I want people (like you) to look for flaws in my procedures or reasoning so I can fix them!

Every round of combat was roll-based, but using the built-in Visual Basic RNG ... which is good enough for most purposes, but if I was doing this stuff as a scientist or a mathematician I'd be using a subscription service-based RNG/cosmic-ray device etc.



Hmm, well for batch (im a noob <3) I do this
set /a roll1=%RANDOM% * %g1att% / 32768 + 1
Random sets a random number from 0 and 32767. So this makes it to choose a number from 1 to max damage.
Lade...
Lade...
04.02.2014 - 13:06
Geschrieben von Guest, 04.02.2014 at 12:10

Geschrieben von zombieyeti, 04.02.2014 at 12:03

Geschrieben von Guest, 04.02.2014 at 11:53

Wow this thread is so long
Hmm, is this roll-based?
Hehe, don't do too much calcs I don't want everyone to have top secret info ;_;

The 'methodology part' is very long -- I want people (like you) to look for flaws in my procedures or reasoning so I can fix them!

Every round of combat was roll-based, but using the built-in Visual Basic RNG ... which is good enough for most purposes, but if I was doing this stuff as a scientist or a mathematician I'd be using a subscription service-based RNG/cosmic-ray device etc.



Hmm, well for batch (im a noob <3) I do this
set /a roll1=%RANDOM% * %g1att% / 32768 + 1
Random sets a random number from 0 and 32767. So this makes it to choose a number from 1 to max damage.


Maybe this will work better for you: set /a roll=%random% %%8 +1. The expression I have provided gives you a number from 1-8. It has been a while since I used batch scripts however, so I am speaking out of a desire to help, not current expertise, so you may have to adjust my suggestion a bit.

Thanks again, by the way, you did get me to thinking ... PC-based pRNGs do have a certain 'periodicity' to them -- meaning that over a long enough period of time, the patterns repeat ... which in a way is good -- I'll never have to worry about running 100 000 000 battles again AND AW probably also uses a similar pRNG to the one I'm using.

That being said, I am using a pRNG-based Battle Simulator NOT because it is the RIGHT way to do it, but because it is the EASY way to do it. The RIGHT way would be to exhaust the large-but-finite possibilities associated with a battle event to determine the odds. For example in an 1 Tank v 1 Infantry scenario, there are 56 possibilities on the first roll. Some of those possibilities lead to one or both units being destroyed. The possibilities that don't lead to the next roll, and so on.
Lade...
Lade...
05.02.2014 - 20:32
Pretty graph :) but it does not seem complete, try adding all the data, and bold the ones you find are note worthy

I also don't think both destroyed is a possibility, atleast I don't remember any.
Lade...
Lade...
06.02.2014 - 07:58
You. I need your help! I shall PM u.
As to your comments:
1. I intentionally didn't fill in anything below or above the 'straddle' value because it takes a while for the simulations to run. The information might be useful to some, but once the attack is <50% likely to succeed or >=95% likely to succeed most players have the info they need to add or not add that extra unit.

2. Turns out the simulator is wrong anyway. My incomplete understanding of Battle Mechanics led me to omit damage exceeding the HP of a unit to 'spillover' to the next unit on that team. So the results are wrong. Thanks to AlexMeza for pointing that out.


Geschrieben von Cthulhu, 05.02.2014 at 20:32

Pretty graph :) but it does not seem complete, try adding all the data, and bold the ones you find are note worthy

I also don't think both destroyed is a possibility, atleast I don't remember any.
Lade...
Lade...
06.02.2014 - 14:50
Less relevant data summarized, notable data bolded, highlighted and discussed in 'Takeaway' section.
Also 'both destroyed' has been changed to be less confusing.

Geschrieben von Cthulhu, 05.02.2014 at 20:32

Pretty graph :) but it does not seem complete, try adding all the data, and bold the ones you find are note worthy

I also don't think both destroyed is a possibility, atleast I don't remember any.
Lade...
Lade...
06.02.2014 - 15:07
AlexMeza
Konto gelöscht
By the way, neutrals do not get the +1 def in city buff. Just wanted to point it out, as many people would get confused this is against neutrals.
Lade...
Lade...
06.02.2014 - 16:44
The chart above is meant to express the results of any battle of 8 v 7, where both sets of units have 7 HP and 5 critical. It could be SM bombers attacking Destroyers, or Tanks attacking def bonus infantry.

That being said, your clarification is well taken. I will run two more charts. One of 8 v 6 and one of 8 v 4, as those are commonly faced in first turn attacks.

Geschrieben von Guest, 06.02.2014 at 15:07

By the way, neutrals do not get the +1 def in city buff. Just wanted to point it out, as many people would get confused this is against neutrals.
Lade...
Lade...
06.02.2014 - 17:42
AlexMeza
Konto gelöscht
Geschrieben von zombieyeti, 06.02.2014 at 16:44

The chart above is meant to express the results of any battle of 8 v 7, where both sets of units have 7 HP and 5 critical. It could be SM bombers attacking Destroyers, or Tanks attacking def bonus infantry.

That being said, your clarification is well taken. I will run two more charts. One of 8 v 6 and one of 8 v 4, as those are commonly faced in first turn attacks.

Geschrieben von Guest, 06.02.2014 at 15:07

By the way, neutrals do not get the +1 def in city buff. Just wanted to point it out, as many people would get confused this is against neutrals.



Oh, okay.
I'll do one for Infs vs Militias, LB strat. Seriously, I have been making tests and calcs, but no one gets the real power of LB.
LB tanks are as good as GC tanks in attacking. That's all I know at the momment.
And 10 militias vs 8 militias = high chance of winning, 9 will do it sometimes. then 11 beats 9-10, 12 beats 11, 13 beats 12..

The more rolls there are, the more chances you have to get lucky as LB.
The more high your attack is, the more good your crit hit will be.
Lade...
Lade...
07.02.2014 - 14:19
Agreed, while units destroy each other all the time, in 35 attempts of 1 tank v 1 infantry in a Casual Game, I did not witness one battle where there was no survivor.

The chart will be updated yet again. The winner of a battle will be the unit with the highest SP, in cases where otherwise there is no survivor.

I'll re-edit the masthead to 'obsolete' the current information.

Geschrieben von Cthulhu, 05.02.2014 at 20:32

Pretty graph :) but it does not seem complete, try adding all the data, and bold the ones you find are note worthy

I also don't think both destroyed is a possibility, atleast I don't remember any.
Lade...
Lade...
07.02.2014 - 19:59
Did you test your value with actual game values?
Lade...
Lade...
08.02.2014 - 00:29
It depends on what you mean by values.
If you're asking if I used the game's Battle Mechanics, I only have what's available to me(documentation and opinions of others), coupled with my possibly imperfect implementation of these mechanics. However, any time I make an assertion my methodology and approach are presented transparently, for critique.
All of these are assertions backed up by the existing documentation of Battle Mechanics, which is incomplete.
- If you're asking if I used unit characteristics, I did publish the Damage, HP, Critical etc. that I used as the basis for my experiments.
- I grant the very real possibilities that Battle Mechanics, as incomplete/published are different than what the game actually uses, and/or that my implementation of this 'business logic' to the game is also imperfect. To both possibilities, I publish my sources, approach and results for fair criticism!

It depends on what you mean by test.
Did I observe my simulated results of 100,000 battles and compare the results with in-game observations in any statistically-meaningful way? No.

That being said:
- Alex has looked at my first draft and mentioned that HP killing a unit spills over into the next, and while his assertion was unsubstantiated at the time, there was no evidence against his assertion AND his recomended change fit as much evidence as I had well enough (and later, I found some documentation supporting his change).
- You observed that no-win BATTLES weren't something you remember, even if the troops in a skirmish might eliminate each other. Again, no documentation, but a careful but brief test (30+ attacks one tank v. one Infantry) with zero 'mutual annhilations' did lead me to conclude (confidence of > 99.9999999999995% (14 9's and a 5) on an event that should happen 36% of the time) that you were also correct, leading me to improve my approach.

I make the reasonable-but possibly incorrect leap that, in the cases of battles where final units would eliminate each other, that the unit with the most HP will be the victor. Since even that approach will leave 'least dead' HP ties unresolved, I will mark those results as undetermined (e.g. 0HP and 0HP, -4 HP and -4HP).
The game may not use my 'least dead' approach to reconcile otherwise-mutual-destruction scenarios. It may do a coin flip. It may weight this with advantage to the defender/attacker. It may choose the unit with the highest HP before the final round.

Geschrieben von Cthulhu, 07.02.2014 at 19:59

Did you test your value with actual game values?
Lade...
Lade...
08.02.2014 - 09:21
Most updated chart has addressed all noted issues to date.
Lade...
Lade...
12.02.2014 - 01:48
Ok to lock, as no one has posted any contradictions or questions!
Lade...
Lade...
atWar

About Us
Contact

AGB | Servicebedingungen | Banner | Partners

Copyright © 2024 atWar. All rights reserved.

Bewirb dich

Empfehle uns weiter