bugpokersource - Bugs: bug #13877, Bug in DECK_MONTECARLO_N_CARDS_D

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #13877: Bug in DECK_MONTECARLO_N_CARDS_D

Submitted by:  Jared Contrascere <jcontra>
Submitted on:  Mon Jul 6 03:06:57 2009  
Category: poker-evalSeverity: 4 - Important
Priority: 5 - NormalStatus: Ready For Test
Privacy: PublicAssigned to: None
Open/Closed: Open

Thu Jul 9 22:34:00 2009, comment #2:

I've added a test case that's based on a modified version of the five_card_hands example program. It does the same thing, but instead of exhaustively enumerating all possible hands, it does so for 1,000 iterations.

(file #6178)

Jared Contrascere <jcontra>
Wed Jul 8 09:51:34 2009, comment #1:


dh2 ( on irc ) looked at your fix and agrees. Would you be willing to write a test case that demonstrate how it works ? There are a few tests already in poker-eval that can be run with make check.


Loic Dachary <loic>
Project Administrator
Mon Jul 6 03:06:57 2009, original submission:

Currently, the macro MONTECARLO_N_CARDS_D is defined as

#define MONTECARLO_N_CARDS_D(c,n,d,nc,ni,a) \
DECK_MONTECARLO_N_CARDS_D(Deck, c, n, d, nc, ni, a)

This definition requires one more argument than specified in the base macro. To fix it, the variable 'n' should be removed.

After correcting this and attempting a compile with:
'gcc -o evaluator test.c -I/usr/local/include/poker-eval -L/usr/local/lib -lpoker-eval', the compiler complained that Deck_CardMask_SET was not defined.

To fix this

#define Deck_CardMask_SET CardMask_SET

Should be added to the end of deck.h

Jared Contrascere <jcontra>


Attached Files
file #6178:  monte_nd_test.c added by jcontra (3kB - text/x-csrc)
file #6144:  montecarlo_n_cards_d.patch added by jcontra (1kB - text/x-patch - This is my first patch/contribution to an open project! More to come!)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by proppy (Updated the item)
  • -unavailable- added by loic (Posted a comment)
  • -unavailable- added by jcontra (Submitted the item)
  • -unavailable- added by jcontra

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Jan 12 09:57:39 2010proppyStatusNone=>Ready For Test
    Thu Jul 9 22:34:00 2009jcontraAttached File-=>Added monte_nd_test.c, #6178
    Mon Jul 6 03:06:57 2009jcontraAttached File-=>Added montecarlo_n_cards_d.patch, #6144
      Carbon-Copy-=>Added jcontra
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup