Forum


Programming question? Possible to add more luck to defending territory?
WendysRox wrote
at 9:14 PM, Thursday July 2, 2009 EDT
I studied programming in college (VB, C++, HTML, etc.) and I believe it would be fairly simple to adjust the defense and offense ratings. As a matter of fact, I think this has been done to KDice. But I am new, so maybe I am making assumptions based on a sample size that is too small.

During a game I mentioned this and another player said that there was no way to affect the outcome of the dice because they are based on a random number generator. I believe this is false. I mean, if you can program a slot machine to pay out at a certain percentage, then you can certainly program a dice roll to give the defender a 54% chance of winning instead of a 50% chance. I have especially noticed that close to 70% or more of the 5v3 attacks end with the 5 stack losing. I would like some programmer's to give us their opinions. (And, you're not a programmer if you HTML'd your grandmother's knitting class schedule in Front Page.(Do they still use Front Page)).

I haven't sat down and tried to write this code to see if it could be done. But, my instincts tell me it is possible.

« First ‹ Previous Replies 11 - 14 of 14
mr Kreuzfeld wrote
at 4:46 PM, Wednesday July 8, 2009 EDT
the random numbergenerators i have encountered, takes the serverclock (the only clock the program really can accsess). and if i remember correctly, serverclocks have the time down to at least micro second possebly nanoseconds. it is really easy to make such a clock in most programming and scripting languages.
mr Kreuzfeld wrote
at 4:52 PM, Wednesday July 8, 2009 EDT
it could just take the last few digits, of the clock and make some distributive calulatons with them.

say clock is (in seconds) 24.103856382
newint = K*6 + L*3*6 + J * 6*3*8 + M*6*3*8*2
helpint = newint/6 // this will be an int
finalint = newint-helpint*6
there you have a fairly random number generator.

but these things are build int with way more random formulas in most programminglanguages
mr Kreuzfeld wrote
at 4:59 PM, Wednesday July 8, 2009 EDT
only real problem with that is that random numbers generated this way are really not random,


so there migth be a concern that it will to often give the same results, thus defending would get a higher % of equal rolls. and higher loss % for attackers than it should be.

and since luck is calculated;

if win;
50 % + chanse of loosing

if loss
50% - chanse of winning

and only on attacks (the stat should be named attacking luck)

then we can conclude that in general, the random program favours defenders higher than attackers.

so we can in general substract 0-6 % on the odds of winning.

so instead of 52% for defending, maybe it is close to 55 or maybe even 60
jurgen wrote
at 10:47 AM, Thursday July 9, 2009 EDT
chances of winning 8v8 are theoretically approx. 47,1% so theoretically it's roughly a 5,8% chance of rolling the same total.

so to check the random generator, we should start a project with people we can trust to do this job without cheating (sigh, I hope nobody will try to cheat with this here but again, paranoia ftw!).

At least 1000 8v8 should be tracked for equal totals. 5 people can check 200 rolls easily I think. I wonder if we would end up in the 56 to 60 range for 1000 8v8's?

If I remeber correctly, I tracked 100 8v8's once and I ended up with 7 rolls with equal totals.
KDice - Multiplayer Dice War
KDice is a multiplayer strategy online game played in monthly competitions. It's like Risk. The goal is to win every territory on the map.
CREATED BY RYAN © 2006 - 2026
GAMES
G GPokr
Texas Holdem Poker
K KDice
Online Strategy
X XSketch
Online Pictionary