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.
Conquerclub odds don't match Risk/accepted odds?
Moderator: Community Team
Forum rules
Please read the community guidelines before posting.
Please read the community guidelines before posting.
-
barrycarter
- Posts: 51
- Joined: Sat Jul 31, 2010 10:42 am
Re: Conquerclub odds don't match Risk/accepted odds?
$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)
(I don't know perl, so I'm guessing a bit)
- drunkmonkey
- Posts: 1704
- Joined: Thu May 14, 2009 4:00 pm
Re: Conquerclub odds don't match Risk/accepted odds?
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.

-
barrycarter
- Posts: 51
- Joined: Sat Jul 31, 2010 10:42 am
Re: Conquerclub odds don't match Risk/accepted odds?
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
-
barrycarter
- Posts: 51
- Joined: Sat Jul 31, 2010 10:42 am
Re: Conquerclub odds don't match Risk/accepted odds?
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!
- drunkmonkey
- Posts: 1704
- Joined: Thu May 14, 2009 4:00 pm
Re: Conquerclub odds don't match Risk/accepted odds?
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.

- SirSebstar
- Posts: 6969
- Joined: Fri Oct 27, 2006 7:51 am
- Location: SirSebstar is BACK. Highscore: Colonel Score: 2919 21/03/2011
Re: Conquerclub odds don't match Risk/accepted odds?
this brightened my day gentleman. thank you all
