Page 1 of 1

Conquerclub odds don't match Risk/accepted odds?

PostPosted: Fri Oct 08, 2010 1:57 pm
by barrycarter
I wrote a simple Perl script to compute "intensity cube" (dice) odds,
but my results differ from the generally accepted odds. Could someone
take a quick look at:

http://github.com/barrycarter/bcapps/bl ... b-cubes.pl

and see what I'm doing wrong? When I do this:

bc-conquerclub-cubes.pl | sort | uniq -c

I get:

1350 A: 0, D: 2
3780 A: 1, D: 1
2646 A: 2, D: 0

According to http://gamesbyemail.com/Games/Gambit/BattleOdds (and
other sites), the generally accepted odds are:

2275 A: 0, D: 2
2611 A: 1, D: 1
2890 A: 2, D: 0

Is this a glitch in my program or have I discovered something Earth-shattering?

Of course, I may just be misunderstanding the way intensity cubes work.

Re: Conquerclub odds don't match Risk/accepted odds?

PostPosted: Fri Oct 08, 2010 2:15 pm
by sherkaner
$d1 >= $a1, don't you want to do @d[0] >= @a[0] (or something like that)?
(I don't know perl, so I'm guessing a bit)

Re: Conquerclub odds don't match Risk/accepted odds?

PostPosted: Fri Oct 08, 2010 2:30 pm
by drunkmonkey
sherkaner wrote:$d1 >= $a1, don't you want to do @d[0] >= @a[0] (or something like that)?
(I don't know perl, so I'm guessing a bit)


This is it. I guarantee he's banging his head on the desk as he reads it.

Re: Conquerclub odds don't match Risk/accepted odds?

PostPosted: Fri Oct 08, 2010 3:34 pm
by barrycarter
sherkaner wrote:$d1 >= $a1, don't you want to do @d[0] >= @a[0] (or something like that)?
(I don't know perl, so I'm guessing a bit)


ARGH! That might be it. I'm using variables called $a1, and $a[1]... that's just bad programming :(

Re: Conquerclub odds don't match Risk/accepted odds?

PostPosted: Fri Oct 08, 2010 3:37 pm
by barrycarter
drunkmonkey wrote:
sherkaner wrote:$d1 >= $a1, don't you want to do @d[0] >= @a[0] (or something like that)?
(I don't know perl, so I'm guessing a bit)


This is it. I guarantee he's banging his head on the desk as he reads it.


BANG BANG BANG! OK, I corrected my error and got the accepted results.

I now officially suck at both ConquerClub AND writing Perl scripts, woohoo!

Re: Conquerclub odds don't match Risk/accepted odds?

PostPosted: Fri Oct 08, 2010 3:48 pm
by drunkmonkey
barrycarter wrote:I now officially suck at both ConquerClub AND writing Perl scripts, woohoo!


It happens. You have no idea how much frustration I went through this morning over 1 letter in a variable. :x

Re: Conquerclub odds don't match Risk/accepted odds?

PostPosted: Fri Oct 08, 2010 4:19 pm
by SirSebstar
this brightened my day gentleman. thank you all