lightcastle
lightcastle
  • Threads: 1
  • Posts: 5
Joined: Jun 2, 2012
June 2nd, 2012 at 12:35:53 PM permalink
Hi everyone, newbie here.

I did some poking around trying to find this, and the closest I got was this similar thread.


Not quite what I want to ask, though.

Some friends and I are trying to hammer out a game and we want to figure the odds for the dice mechanic. If you remember risk, the way army battles went was that the attacker rolled dice, so did the defender, and the dice were matched highest to lowest. Ties went to the defender.

So two options have been thrown around.

Option 1 would be basically the same as risk, with 3 dice on each side. Match highest to lowest, ties are a tie in this case.

Example the first: Player A rolls 4, 3, 1 -- Player B rolls 2, 6, 5.

That would end up as 3 wins for Player B - (6v4, 5v3, 2v1).

Example the second: Player A rolls 5, 2, 2 -- Player B rolls 5, 3, 1

That would end up as a draw (5v5 is a tie, 3v2 to B, 2v1 to A)

Option 2 is slightly different. You get as many wins as you have dice higher than the opponent's highest die. Ties are ignored if they are the highest.

Example: Player A rolls 4, 3, 1 -- Player B rolls 2, 6, 5.

That would end up as 2 wins for Player B - (6 and 5 > than 4.)

Example the second: Player A rolls 5, 2, 2 -- Player B rolls 5, 3, 1

That would end up as 1 win for Player B (5 and 5 cancel, 3 beats 2.)

Is there an elegant way to tackle the math for figuring out what the odds would be of getting 1, 2, 3 wins in each system? Brute forcing it seems like an exercise in madness.

Thanks.
rainman
rainman
  • Threads: 19
  • Posts: 1901
Joined: Mar 28, 2012
June 2nd, 2012 at 12:49:28 PM permalink
I thought in risk one side rolled three dice and the other two. I could be wrong
lightcastle
lightcastle
  • Threads: 1
  • Posts: 5
Joined: Jun 2, 2012
June 2nd, 2012 at 2:57:16 PM permalink
No, you're right. (up to 3 to attack, up to 2 to defend)
I'm not doing Risk. Just a bit of that similar matching idea as a concept.
EdCollins
EdCollins
  • Threads: 20
  • Posts: 1739
Joined: Oct 21, 2011
June 3rd, 2012 at 10:43:00 PM permalink
No, I don't know of an elegant way of computing it. But here are your odds (probability) for System #1:

Attacker 3 wins = 6,420 / 46,656 or .1376
Attacker 2 wins = 6,810 / 46,656 or .1459
Attacker 1 wins = 6,852 / 46,656 or .1468

Defender 3 wins = 6,420 / 46,656 or .1376
Defender 2 wins = 6,810 / 46,656 or .1459
Defender 1 wins = 6,852 / 46,656 or .1468

No one wins (all draws) = 6,492 / 46,656 or .1391

(My source is a quick & dirty little program I wrote to loop through all possible dice rolls, and after each roll tabulating the results.)
EdCollins
EdCollins
  • Threads: 20
  • Posts: 1739
Joined: Oct 21, 2011
June 3rd, 2012 at 10:44:04 PM permalink
It's bedtime for me but tomorrow I will give you the odds (probability) for System #2.
EdCollins
EdCollins
  • Threads: 20
  • Posts: 1739
Joined: Oct 21, 2011
June 4th, 2012 at 12:12:25 AM permalink
Shoot, can't sleep. Might as well tackle this now.

System #2:

Attacker 3 wins = 1,443 / 46,656 or .0309
Attacker 2 wins = 6,528 / 46,656 or .1399
Attacker 1 wins = 14,859 / 46,656 or .3184

Defender 3 wins = 1,443 / 46,656 or .0309
Defender 2 wins = 6,528 / 46,656 or .1399
Defender 1 wins = 14,859 / 46,656 or .3184

No wins for either player = 996 or .0213

Again, the easiest way for ME to solve it is by brute force... check every possible dice roll and keep track of the results.

Note: A computer simulation would also give these percentages (or probably close enough for your purpose) if the sim was for a few million dice rolls. But no simulation was needed here... it's just as fast and just as easy to tabulate all of the 46,656 possible dice rolls. So these are the exact percentages.

Night.
lightcastle
lightcastle
  • Threads: 1
  • Posts: 5
Joined: Jun 2, 2012
June 4th, 2012 at 4:09:31 PM permalink
Thanks.

Interesting. System 1 really does seem to be almost flat, while 2 get something closer to a proper bell curve. I am surprised by how often a tie still happens, though.

May I inquire how you got a hold of this number crunching program? It's not ideal, given I'd like to know what's happening underneath, but it is very useful.
dwheatley
dwheatley
  • Threads: 25
  • Posts: 1246
Joined: Nov 16, 2009
June 4th, 2012 at 4:47:20 PM permalink
He probably wrote it.
Wisdom is the quality that keeps you out of situations where you would otherwise need it
EdCollins
EdCollins
  • Threads: 20
  • Posts: 1739
Joined: Oct 21, 2011
June 4th, 2012 at 5:03:14 PM permalink
dwheatley is correct. It's just a simple program I wrote last night, in a language called PowerBASIC.

http://www.powerbasic.com/products/pbcc/

The entire program is probably not more than 30 lines of code.

The program prints to a text file all 46,656 possible dice rolls and the winner of the roll. It keeps track of the results and prints those to the same text file, at the end.
lightcastle
lightcastle
  • Threads: 1
  • Posts: 5
Joined: Jun 2, 2012
June 4th, 2012 at 10:12:07 PM permalink
Impressive. :)
MathExtremist
MathExtremist
  • Threads: 88
  • Posts: 6526
Joined: Aug 31, 2010
June 4th, 2012 at 10:34:09 PM permalink
For a problem that small you can just do it in Excel and benefit from the live update abilities. Just drop in all 6^6 combinations and start writing formulas on them, doing fill-downs as you go. You'll probably come up with many more than two sets of rule possibilities.
"In my own case, when it seemed to me after a long illness that death was close at hand, I found no little solace in playing constantly at dice." -- Girolamo Cardano, 1563
lightcastle
lightcastle
  • Threads: 1
  • Posts: 5
Joined: Jun 2, 2012
June 6th, 2012 at 4:28:31 PM permalink
Interesting.
Not enough of an Excel wiz, I suspect.

I guess I would then have to re-do for adding or subtracting dice.

Still, might be the easiest way.
  • Jump to: