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. |
|
montecarlo wrote
at 9:36 PM, Thursday July 2, 2009 EDT if (username == leekstep){
dieValue = ceil(rnd()*6); dieValue = dieValue*0.9; } else{ dieValue = ceil(rnd()*6); } ...or something like that... been awhile. |
|
mr Kreuzfeld wrote
at 9:27 AM, Friday July 3, 2009 EDT one of the most common random number generators is based upon the system clock. I belive this is the most common way to make "random" numbers. first you take the system time, then you run it though some distributive equations, and lastly make sure the sample space fits the intended area.
on a side note, defender should have about 52% to defend an 8v8, but It is plain to see that defences happends way to often, seeing as luck is only derived from attacking luck. and since the average luck in kidce is about 47%, that means that defences happens 6% too much |
|
WendysRox wrote
at 6:35 PM, Tuesday July 7, 2009 EDT why should a defender get 52%??? should it not be 50%?
|
|
Jslap! wrote
at 1:59 AM, Wednesday July 8, 2009 EDT rng is done serverside
|
|
jurgen wrote
at 8:45 AM, Wednesday July 8, 2009 EDT WendysRox, don't forget that if attacker and defender roll the same total, the defender wins
Each player rougly has 48% chance of rolling the highest total with 8 dice and in 4/100 occasions, the outcome is 28/28;29/29,.... so these are added tot the winning% of the defender, hence the 48%/52% chances The odds become even worse for the attacker in 7v7;6v6;... down to the worst winning odds for 2v2 because the proportion of outcomes with an equal total for att and def increases with fewer dice rolled If you really want 50/50 chances for an 8v8, you need to roll again (and again) until 1 player rolled more than the other (no advantage for the defender) but we don't want that, the difference in odds adds more strategy to the game (do I wait and count on the other player losing or do I risk a bit more but I keep the initiative in the battle ...) Don't only count on your instincts, if you really think 5v3 loses 70% of the time, note 100 outcomes of 5v3 and you will notice it will be much closer to the outsome you can statistically expect from a 5v3. I know it can sometimes feel like the 5v3 loses a lot but you just remember the frustrating losses more than the expected wins. So i think the odds are good and intiutive as they are now, no need to tweak them |
|
kam|k2 wrote
at 10:42 AM, Wednesday July 8, 2009 EDT You should start here Wendy:
Ryan: everybody knows you need at least $100 to bribe me |
|
Louis Cypher wrote
at 11:10 AM, Wednesday July 8, 2009 EDT Jurgen - your counting _only_ works, if you count the attacks of all players. If you stick to one account and that one is on the blacklist, we all know what the outcome is. You said it yourself, use the bj-kitty-avatar if you forgot :-))
Really - the luck-statitics is a joke. The impact of experiencing an unlikely loss can hardly be calculated (I'm not sure if it is a semantic problem or not, thus I don't know if it can be computed or not). |
|
leeeroy jenkins wrote
at 11:21 AM, Wednesday July 8, 2009 EDT monte-- assuming that we're using rounding here to typecast doubles to ints, that code would only working converting 6s to 5s, since everything else would retain its original value (4.5 would round back to 5, 3.6 would round back to 4). and it'd be pretty obvious if leek never rolled a 6. I think it'd be something more like:
dieValue = ceil(rnd()*6); if ((username == leekstep)&&(rnd()>.8)&&(dieValue>1)) dieValue--; so that he loses 1 from a die value 1/6 of the time. Also, my grandmother's famed Crotchet Circle and Hemming Happy Hour are on for next week-- I'm making a webpage for it now on geocities, will post it soon! |
|
jurgen wrote
at 2:55 PM, Wednesday July 8, 2009 EDT Louis, I know what you are talking about. I had a month where my luck dropped ridiculously low after 40 games or something. After more than 60 frustrating games I abandoned my main that month and my alt seemed not to suffer from that ugly jinx. Maybe it was just paranoia or superstition but it felt ugly.
Anyway, I was just trying to explain a few simple things about 5v3 and 8v8 to a person that has almost no chance of ever getting on a black list so probably the odds are correct for him/her |
|
skrumgaer wrote
at 3:46 PM, Wednesday July 8, 2009 EDT Kreuz:
If the random number generator is based on the system clock, whose clock would it be? Ryan's server's? The individual players'? Could you reset your luck by resetting your computer's clock (can be done through WWV's website in the US)? |