Map Database  •  FAQ  •  RSS  •  Register  •  Login

KaM battle simulator

<<

Siegfried

User avatar

Knight

Posts: 494

Joined: 24 Jul 2009, 22:00

Post 25 Jul 2009, 23:13

KaM battle simulator

Well, since my first results are ready it's time to announce the development of my battle simulation code.

The aim is to build the battle mechanics of KaM but without any graphics or animation. At the moment the code only handles TSK 1on1 close combat fights. There is nothing to release yet but the results from the 1on1 fights.

Each military unit had to fight against each other a million times. The uncertainty of the presented numbers is in the range of 0.1%.

The results for bowman and crossbowman is not valid because, as said, I only simulated close combats. The long-distance fighters would have 0% each, but to give you a feeling of their strength they were dealt as close combat fighters.

To my surprise the results were a bit different than I expected, especially for the pikeman, who is way stronger than I thought.

Image

The table has to be read this way:
For example I'm interested in the probability that a lance carrier wins agains a scout. The lance carrier will strike first. His win probability then is 79%.
If the scout strikes first, the probability of the lance carrier is (100% - 25%) = 75%.

This becomes interesting when a pikeman meets a barbarian (warrior). Both units are of merely equal strength in TSK.
<<

JBSnorro

User avatar

Barbarian

Posts: 106

Joined: 20 Nov 2007, 23:00

Post 26 Jul 2009, 00:09

Firstly I was impressed by the results. Then I started noting things.
The "1 million" is absurd, how can you simulate that? I reckon this was done in one of your own programs instead of KaM. And if it was made by your own program, these results would be useless to anyone else, because you cannot claim these results are identical to the results from KaM(if anyone had the time to do thousands of battles).

And I don't get the values with the archers..... Because if you had an archer and I had a militia, I can guarantee my victory.
<<

Siegfried

User avatar

Knight

Posts: 494

Joined: 24 Jul 2009, 22:00

Post 26 Jul 2009, 08:04

Of course they were done with my code, not with KaM itself, otherwise this would take ages. The information about how the battle system works come from the official strategy book by Markus Betz which I trust in. So I can simulate how a battle goes in KaM without running KaM and get the correct results, though.

There's a randomize function in the battle mechanics, so I had to go up to a high number of runs to get a reasonable statistics.

The values with the arches don't make sense, there you are right. That's why I put them in grey. Up to now I only can simulate close combat until the path finding is implemented. And the archers obviously can't fight in close combat and will loose a 100%.

The reason why I still included them in the table is to give you a feeling a their relative strength, which is an overall goal of all the statistics. I think it doesn't really matter if the barbarian wins with 76% or 80%, but for a rough estimation of the placing for your army, you should know that your legion of barbarians rather should try to fight the opponent's axemen than his scouts.
<<

JBSnorro

User avatar

Barbarian

Posts: 106

Joined: 20 Nov 2007, 23:00

Post 26 Jul 2009, 13:16

I didn't even know that kind of book existed. In what language do you that book? I can online find it in German on the internet and my german really sucks......

Anyway, in that case these results may be right after all.....
<<

merchant_992

User avatar

Pikeman

Posts: 162

Joined: 11 Nov 2006, 23:00

Location: Rinsumageest, Nederland

Post 26 Jul 2009, 15:05

Is there any PDF of that book? And is it only in German?
<<

Siegfried

User avatar

Knight

Posts: 494

Joined: 24 Jul 2009, 22:00

Post 27 Jul 2009, 20:31

As far as I know there is no pdf of that book just as little as there is a non-german version of it.
German is my native tongue so it's easy to understand for me.

In this book the author describes exactly how the fights between units are calculated, so it was the easy part to re-build that.

The difficult part will be to find a KI (that mainly means path finding) that is nearly as - say smart - as the KaM KI :wink:

My exemplar of the book, which I found again some days ago, recently had its 10th birthday and now looks a bit rough :wink:
<<

JBSnorro

User avatar

Barbarian

Posts: 106

Joined: 20 Nov 2007, 23:00

Post 27 Jul 2009, 22:26

You do realise you're probably the only one in this community who knows how the battlesystem works? Lewin, Krom, Harold and I have been wondering for ages how it works. We've all been postponing the military stuff because of that. Could you explain it to us, or are you willing to e.g. copy some pages which contain most of the details? I'd certainly love that!
<<

Siegfried

User avatar

Knight

Posts: 494

Joined: 24 Jul 2009, 22:00

Post 28 Jul 2009, 06:38

Sorry, I didn't realize nobody knew this. I thought this is widely known, as I found it on the internet too. But only in german language, I must confess.

viewtopic.php?p=6008&mforum=knights#6008
Here I described it. If something is unclear, don't hesitate to ask.

I'm not sure if I can scan the relevant pages from the strategy book as there are some copyright issues and germany's government is running mad with copyrights lately. Besides, it would be in german, too.

For example (in german), the information was already spoiled here (but with wrong archer's attack values).

*edit: the attack values and defence values are the ones Merchator's Unit Editor gives you.
For the pikeman & lancecarrier, the strategy book says, the Strength (Pikes) value musst be added to the normal values and not replace it.
So the Pikeman has an attack value A = 0.35 * 0.8 = 1.15 agains a knight or Scout and not only 0.8.
<<

Humbelum

User avatar

Lance Carrier

Posts: 60

Joined: 15 Jul 2009, 22:00

Location: Germany

Post 31 Jul 2009, 17:55

<<

JBSnorro

User avatar

Barbarian

Posts: 106

Joined: 20 Nov 2007, 23:00

Post 31 Jul 2009, 21:31

Thnx

Is there anything about regeneration in there? In other words, can a unit gain the lifepoints he lost earlier? Because from game-experience i'd say it is possible.
<<

Humbelum

User avatar

Lance Carrier

Posts: 60

Joined: 15 Jul 2009, 22:00

Location: Germany

Post 31 Jul 2009, 21:53

no nothing. I think the lifepoints are for every fight. For example after a fight, if the troops are able to get orders.

I think that because I never saw that a troop that had a fight a few seconds ago was weaker then another group who has no fight done.

So I think the lifepoints get a reset after the order buttons changed vom dark grey to normal grey(from unable to get orders to able). I hope you understand what I mean
<<

JBSnorro

User avatar

Barbarian

Posts: 106

Joined: 20 Nov 2007, 23:00

Post 31 Jul 2009, 22:35

Yes, you're probably right
<<

Merchator

User avatar

Sword Fighter

Posts: 336

Joined: 27 Dec 2006, 23:00

Location: Germany

Post 31 Jul 2009, 22:39

Humbelum wrote:So I think the lifepoints get a reset after the order buttons changed vom dark grey to normal grey(from unable to get orders to able). I hope you understand what I mean


But what if they get hit by a bowman or crossbowman? Then they are able to move AND do lost hitpoints, aren't they?
<<

JBSnorro

User avatar

Barbarian

Posts: 106

Joined: 20 Nov 2007, 23:00

Post 31 Jul 2009, 22:51

Hm good point..... Damn, still no solution then. Perhaps it is a timer, but that would be weird too.
<<

Ben

User avatar

Prince Lothar

Posts: 3710

Joined: 08 Jan 2009, 23:00

Location: United States of America GMT-5

KaM Skill Level: Beginner

Post 05 Oct 2009, 03:08

From game experience I think there is a timer. For example, lets say your swordfighter got hit 3 times with a crossbowman. If he moves out of the way and misses the next shot he may be able to survive another 2 or so, whereas if he hadn't moved he would have died. I think the "life points" are re-generated over time, perhaps just seconds. I think I may be just confussing. I admit I have confussed myself by re-reading what I posted XD. I can't really explain my theroy so well....
Liberté, Égalité, KaM
Next

Return to Other Creations

Who is online

Users browsing this forum: No registered users and 2 guests