Alamaze & Fall of Rome Forum
#300 - Experimental - Printable Version

+- Alamaze & Fall of Rome Forum (https://kingdomsofarcania.net/forum)
+-- Forum: ALAMAZE (https://kingdomsofarcania.net/forum/forumdisplay.php?fid=11)
+--- Forum: Active Games (https://kingdomsofarcania.net/forum/forumdisplay.php?fid=23)
+--- Thread: #300 - Experimental (/showthread.php?tid=9626)



RE: #300 - Experimental - Hawk_ - 12-10-2014

As the Sorcerer in game 116 I failed to capture a village with a wounded division with a PC value of 7347.

The village had a value of 3528  (2.08 to 1).  I lost 5700 troops.

This is a warning to new players who might not recognize the limitations of Sorcerer troops.





[/quote]


RE: #300 - Experimental - unclemike - 12-11-2014

I'm getting a lot of questions on how combat is currently being handled in this game so I'll provide a little bit of it below.

Keep in mind that the following is not Alamaze's or Fall of Rome's calculations since I haven't referenced the official code so it's ok to see what I'm doing now. However, once the code is converted to the official version, you'll have to ask Ry Vor for any details on these kind of things...

Sample combat of 5 EL brigades vs 3 SO brigades:

Elf troop composition (1900 total troops per brigade)
__0 skirmishers
300 bowmen
200 expert archers
100 horse archers
100 light cavalry
100 medium cavalry
__0 heavy cavalry
100 elite cavalry
400 light infantry
500 medium infantry
__0 heavy infantry
100 guard infantry

Sorcerer troop composition (2000 total troops per brigade)
100 skirmishers
100 bowmen
__0 expert archers
100 horse archers
__0 light cavalry
100 medium cavalry
__0 heavy cavalry
__0 elite cavalry
700 light infantry
800 medium infantry
100 heavy infantry
__0 guard infantry

Troop composition currently has a defensive bonus as follows:
Tier 1: 0% (light troops)
Tier 2: 5% (medium troops)
Tier 3: 10% (heavy troops)
Tier 4: 15% (elite troops)

During each combat phase (archer, magic, infantry, combined), I calculate the ratio of the particular phase for each group and add any proportional troop composition defensive value. For example, if 5 EL brigs fought 3 SO brigs then the archer phase would look like:

5 EL brigs combat value = 5 x 2900 EL brig combat value = 14500 group combat value (not including terrain, leaders, magic, ...etc.)
3 SO brigs combat value = 3 x 2380 SO brig combat value = 7140 group combat value

5 EL brigs = 9500 total number of EL troops
3 SO brigs = 6000 total number of SO troops

EL archers (offensive so no tier bonus):
EL skirmishers__(5 brigs x 0 skirmishers)___/ 9500 total num of troops = 0% ratio
EL bowmen____(5 brigs x 300 bowmen)___/ 9500 total num of troops = 0.16% ratio
EL expert______(5 brigs x 200 expert)_____/ 9500 total num of troops = 0.11% ratio
EL horse_______(5 brigs x 100 horse)_____/ 9500 total num of troops = 0.05% ratio
-----
Total EL archer phase rating = 0.32%
Total EL archer phase combat value = 0.32% x 14500 group combat value = 4640 proportional archer combat value

SO archers (defensive so will receive tier bonus):
SO skirmishers__((3 brigs x 100 skirmishers)___/ 6000 total num of troops) x 0% tier bonus = 0.05% ratio
SO bowmen____((3 brigs x 100 bowmen)_____/ 6000 total num of troops) x 5% tier bonus = 0.0525% ratio
SO expert______((3 brigs x 0 expert)_________/ 6000 total num of troops) x 10% tier bonus = 0% ratio
SO horse_______((3 brigs x 100 horse)_______/ 6000 total num of troops) x 15% tier bonus = 0.0575% ratio
-----
Total SO archer phase rating = 0.16%
Total SO archer phase combat value = 0.16% x 7140 group combat value = 1142 proportional archer combat value

Then compare the two archer combat values to determine how much damage is inflicted upon each group:

4640 EL archer combat value - 1142 SO archer combat value = 3498 damage dealt upon SO group

Need to recalculate the above to determine how much damage is inflicted upon the EL group (since EL archer composition now has the defensive tier bonus applied):

1071 SO archer combat value - 5024 EL archer combat value = 0 damage dealt upon EL group

There are more factors involved than just the above during battles but this is a sample of what's going on until I get the official algorithms. If anyone want's to suggest something simple to modify the above calculations to be more fair then let me know and I can throw it in...


RE: #300 - Experimental - HeadHoncho - 12-11-2014

Just wondering, why are you subtracting SO archery value from the EL archery value? I would figure you just take each aide's archery value and apply it against the other side's defense value and then apply losses to each side.


RE: #300 - Experimental - unclemike - 12-11-2014

(12-11-2014, 01:35 PM)HeadHoncho Wrote: Just wondering, why are you subtracting SO archery value from the EL archery value? I would figure you just take each aide's archery value and apply it against the other side's defense value and then apply losses to each side.

When I was playing around with it, I thought it would be better if each phased combat element fought each other at their appropriate moment in the battle. So archer damage would only consider the opposing archers for available defense during their particular phase (same for infantry fighting each other and such). Doing it this way also places greater emphasis on troop composition (or the quality of the brigade's composition) vs the general combat rating of the opposing group. If I didn't do it this way then a general archer would be nearly the equivalent to an elite archer for the most part. But like I said, all of this will probably change anyway so if there are any mathematicians out there, let me know if there's a better manner of calculating battles in general until the official methods are used. Just keep in mind that I'm leaving out quite a few of other factors such as a kingdom's defensive value (absorbs damage, more for the military kingdoms than others), wizard presence, leaders, morale, ...etc.


RE: #300 - Experimental - Hawk_ - 12-11-2014

(12-11-2014, 01:14 PM)unclemike Wrote: I'm getting a lot of questions on how combat is currently being handled in this game so I'll provide a little bit of it below.

Keep in mind that the following is not Alamaze's or Fall of Rome's calculations since I haven't referenced the official code so it's ok to see what I'm doing now. However, once the code is converted to the official version, you'll have to ask Ry Vor for any details on these kind of things...

Sample combat of 5 EL brigades vs 3 SO brigades:

Elf troop composition (1900 total troops per brigade)
__0 skirmishers
300 bowmen
200 expert archers
100 horse archers
100 light cavalry
100 medium cavalry
__0 heavy cavalry
100 elite cavalry
400 light infantry
500 medium infantry
__0 heavy infantry
100 guard infantry

Sorcerer troop composition (2000 total troops per brigade)
100 skirmishers
100 bowmen
__0 expert archers
100 horse archers
__0 light cavalry
100 medium cavalry
__0 heavy cavalry
__0 elite cavalry
700 light infantry
800 medium infantry
100 heavy infantry
__0 guard infantry

Troop composition currently has a defensive bonus as follows:
Tier 1: 0% (light troops)
Tier 2: 5% (medium troops)
Tier 3: 10% (heavy troops)
Tier 4: 15% (elite troops)

During each combat phase (archer, magic, infantry, combined), I calculate the ratio of the particular phase for each group and add any proportional troop composition defensive value. For example, if 5 EL brigs fought 3 SO brigs then the archer phase would look like:

5 EL brigs combat value = 5 x 2900 EL brig combat value = 14500 group combat value (not including terrain, leaders, magic, ...etc.)
3 SO brigs combat value = 3 x 2380 SO brig combat value = 7140 group combat value

5 EL brigs = 9500 total number of EL troops
3 SO brigs = 6000 total number of SO troops

EL archers (offensive so no tier bonus):
EL skirmishers__(5 brigs x 0 skirmishers)___/ 9500 total num of troops = 0% ratio
EL bowmen____(5 brigs x 300 bowmen)___/ 9500 total num of troops = 0.16% ratio
EL expert______(5 brigs x 200 expert)_____/ 9500 total num of troops = 0.11% ratio
EL horse_______(5 brigs x 100 horse)_____/ 9500 total num of troops = 0.05% ratio
-----
Total EL archer phase rating = 0.32%
Total EL archer phase combat value = 0.32% x 14500 group combat value = 4640 proportional archer combat value

SO archers (defensive so will receive tier bonus):
SO skirmishers__((3 brigs x 100 skirmishers)___/ 6000 total num of troops) x 0% tier bonus = 0.05% ratio
SO bowmen____((3 brigs x 100 bowmen)_____/ 6000 total num of troops) x 5% tier bonus = 0.0525% ratio
SO expert______((3 brigs x 0 expert)_________/ 6000 total num of troops) x 10% tier bonus = 0% ratio
SO horse_______((3 brigs x 100 horse)_______/ 6000 total num of troops) x 15% tier bonus = 0.0575% ratio
-----
Total SO archer phase rating = 0.16%
Total SO archer phase combat value = 0.16% x 7140 group combat value = 1142 proportional archer combat value

Then compare the two archer combat values to determine how much damage is inflicted upon each group:

4640 EL archer combat value - 1142 SO archer combat value = 3498 damage dealt upon SO group

Need to recalculate the above to determine how much damage is inflicted upon the EL group (since EL archer composition now has the defensive tier bonus applied):

1071 SO archer combat value - 5024 EL archer combat value = 0 damage dealt upon EL group

There are more factors involved than just the above during battles but this is a sample of what's going on until I get the official algorithms. If anyone want's to suggest something simple to modify the above calculations to be more fair then let me know and I can throw it in...

It would appear looking at this formula that 300 horse archers generate no more offense % than 300 skirimishers.

I would think the phased combat formula should be based on the offensive value that each troop type is contributing and not on the number of troops present in the brigade.

The 300 Cavalry for example, probably produce more offensive points than what 300/1900 indicates.  Especially considering most of the elf infantry is on the lighter side.


RE: #300 - Experimental - unclemike - 12-11-2014

Yes, I originally had the tiered effect regarding troop composition applied to both offensive and defensive calculations but then changed it to just defense (to reduce damage received). I could easily turn it back on for offense as well. Let's give it a try starting with turn 6 orders....


RE: #300 - Experimental - unclemike - 12-11-2014

To answer questions on what "little or no" damage means, the code currently displays the following phrases based upon the amount of damage taken during the individual combat phase:

>= 100% (massive)
>= 80% (devastating)
>= 60% (major)
>= 40% (considerable)
>= 30% (average)
>= 20% (minor)
>= 10% (light)
< 10% (little or no)


RE: #300 - Experimental - unclemike - 12-12-2014

Regarding negative food production (and possibly gold in the future) during seasonal effects, a negative amount for the turn's production won't affect your current treasury storage (by deducting the negative amount) or affect any additional food/gold that you may receive from magic spells or trade. Both the order checker and the game software should display a 0 for the turn's production if either amount is negative. If you notice something different than this then let me know.


RE: #300 - Experimental - unclemike - 12-12-2014

I have a standby position available if anyone is interested. This game is free and does not count towards your account limit. I only ask that you submit your orders on time since missed turns aren't very helpful towards testing the software.


RE: #300 - Experimental - unclemike - 12-12-2014

(12-12-2014, 10:11 AM)unclemike Wrote: I have a standby position available if anyone is interested. This game is free and does not count towards your account limit. I only ask that you submit your orders on time since missed turns aren't very helpful towards testing the software.

Since I'm not above bribing others, I'll throw in an extra 30,000 food and gold, a kingdom brigade, and an adept to help make up for lost turns.