Page 1 of 1

Directional advantage

PostPosted: 13 Aug 2014, 11:29
by Freddy
I noticed some wierd directional based behavior. If I put 100 crossbowmen against other 100 crossbowmen, 20x5 configuration for both, one group up facing down, second down facing up, the top group always wins. I watched them fire, they all start at the same time, they all shoot, but in the end, the top group always wins.

Re: Directional advantage

PostPosted: 13 Aug 2014, 12:23
by Krom
Random is .. random. You need to repeat the experiment a dozen times before any assumptions could be made based on statistics.

Re: Directional advantage

PostPosted: 13 Aug 2014, 14:14
by Remer
I tried it too, with the same settings...

7x = 3(+/-2) Top Soldier survived
3x = 2(+/-2) Bottom Soldier survived

Maybe it's just bad luck? Maybe it's "Who's loaded first"?
(The top-soldier were Player 3, thus I assume Player 3 has it's units ready before Player 4)

Re: Directional advantage

PostPosted: 13 Aug 2014, 14:43
by Krom
This is perfect topic for a devblog article! Give me a day and I'll post it :)

Re: Directional advantage

PostPosted: 13 Aug 2014, 15:06
by Krom
And it's ready: Read at http://www.kamremake.com/devblog/?p=319 and leave your comments here and in the devblog!

Re: Directional advantage

PostPosted: 13 Aug 2014, 17:22
by Freddy
I actually understand random very well. But something behaves very oddly. I tried it again. 100 crossbows, top vs. bottom, 20x5 group shape. Bottom won always (tried 25+ times). Changed positions (one is AI one is me), some outcome for the bottom position.

So I thought maybe it has something to do with elevation. So I moved the group elsewhere on the map. Now the top group won several times (10+). So I flattened the area, thinking that could make it fair. Now the bottom group consistently wins with 40+ soldiers left.

I attached the map I was using. I'm testing in r5503. Dunno what I should take from this, but it is most definitely not random. Am I doing something wrong?

Nice article anyway though.

Edit: I watched the last configuration (flat area, me bottom, AI top) and the battle actually always is the same, every bolt, every death, everything is the same. Always 44 survivors. I tried setting them up to walk two tiles before attacking. Again, different outcome, but every time with the same config, the thing is completely same.

Re: Directional advantage

PostPosted: 13 Aug 2014, 18:58
by Krom
IIRC KaM Remake r5503 always started with the same random seed. Given that and the exact same map config - it's no wonder each round is exact copy of the other one.
For the test I used random seed in each run.

Re: Directional advantage

PostPosted: 13 Aug 2014, 19:31
by Freddy
IIRC KaM Remake r5503 always started with the same random seed. Given that and the exact same map config - it's no wonder each round is exact copy of the other one.
For the test I used random seed in each run.
Well, that explains it. Case closed :D Will the seed change between plays in the newer version?

Re: Directional advantage

PostPosted: 13 Aug 2014, 21:05
by dicsoupcan
yeah i am probabyl way too late to say this, but i noticed it in testing AED02 aswell, as long as i did not select any units or gave them orders the outcome is always the same :P i always wondered why it happenes but apparently it did not made me curious enough to ask. Now i know the awnser, nice devblog :)

Re: Directional advantage

PostPosted: 17 Aug 2014, 10:33
by pawel95
Is it possible that also not developers could get this nice tool somewhere? :D Nice Blog.

Re: Directional advantage

PostPosted: 17 Aug 2014, 11:35
by Krom
The tools source codes are in our SVN, publicly available (.\Utils\Runner sub-folder).
As for making it a standalone working tool - we don't have extra resources for that, sorry.

You can see that we have quite a bunch of tools accompanying KaM Remake development by reading this article: http://www.kamremake.com/devblog/what-e ... game-need/

Re: Directional advantage

PostPosted: 17 Aug 2014, 12:05
by pawel95
Hmm too bad. I would like to test the AI also in some cases, but nevermind then :D If anyone finds something new, you can test it for us, like the direction story :mrgreen:

Re: Directional advantage

PostPosted: 17 Aug 2014, 13:07
by Krom
To make Runner work, we need to manually connect things in code, which stats to show on charts and set up starting map conditions. That is not much harder than using DynamicScripting, but you need to recompile the Runner each time, e.g. with Lazarus.

Re: Directional advantage

PostPosted: 17 Aug 2014, 14:24
by Lewin
I'd be happy to answer questions with compiling/using Runner. As Krom said it works fine in Lazarus which is free. Obviously you'll need some programming knowledge though (knowing dynamic scripts will help a lot since it's the same language).