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 06 Jul 2009 03:06:57 AM UTC  
 
Category: poker-evalSeverity: 4 - Important
Priority: 5 - NormalStatus: Ready For Test
Privacy: PublicAssigned to: None
Open/Closed: Open

Thu 09 Jul 2009 10:34:00 PM UTC, 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 08 Jul 2009 09:51:34 AM UTC, comment #1:

Hi,

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.

Cheers

Loic Dachary <loic>
Project Administrator
Mon 06 Jul 2009 03:06:57 AM UTC, 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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 12 Jan 2010 09:57:39 AM UTCproppyStatusNone=>Ready For Test
    Thu 09 Jul 2009 10:34:00 PM UTCjcontraAttached File-=>Added monte_nd_test.c, #6178
    Mon 06 Jul 2009 03:06:57 AM UTCjcontraAttached 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