Loic Dachary wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Andre Allavena wrote:
>> Hello,
>>
>> I was playing around with the poker-eval library, and I was trying
>> to evaluate probabilities without knowing my opponents cards.
>>
>> Later, I'd like to interface from some ruby code, but for now, I
>> was happy to just play around from the command line.
>>
>> I've tried the pokenum script with various options for the wild
>> cards (somewhere, the python code mentions 255 or __ as a wild
>> card, but it does not seem to work).
>>
>>
>> ./pokenum Ah Kh - __ __ -- As Ks Qs
>>
>> is rejected.
>>
>>
>> I've also tried the following: #!/usr/bin/env python
>>
>> import pokereval as PokerEval
>>
>> def main(): print """Trying the poker eval thing""" y =
>> PokerEval.PokerEval() r= y.poker_eval(game = "holdem", pockets =
>> [["Ac", "As"],['__','__' ]], board = ['2s', '4h', '6d']) print r
>> main()
>>
>>
>> The results are not what I'm expecting. The first player is given a
>> 100% probability of winnings. That's not right.
>>
>>
>> Thanks for the help.
>>
>> André
>>
> Hi,
> 
> You will find examples in the test.py file in pypoker-eval. Some lines
> do what you want. Indeed, the C version does not implement the desired
> feature, it was added to the python wrapping.

Ah..

Great, thanks.

test.py is very useful, but it was not in the Debian python-pypoker-eval 
that I used to install. May I suggest adding it in the doc directory?

Also,
In pokereval.py,
   in
     def poker_eval(self, *args, **kwargs):

there is no mention of the "fill_pockets" option

Shouldn't it be mentioned there?


In pokereval.py
   in
     def winners(self, *args, **kwargs):
The comments reads:
[...]
If the keyword argument "fill_pockets" is set, remove any pocket
hand that contains a place holder (i.e. 255 or __) or any empty
pocket (i.e. []).
"""

My reading of the code says otherwise. I understand the code to do the 
following:
- if it is an empty poket [], it is removed, regardless of argument
- if the argument "fill_pockets" is NOT set, and there are wildcards 
(255 or __) in some pocket cards, then these pockets are removed.




I don't really know the C/C++ wrapping for Python, so the following is a 
wild guess. When you say above that the wildcard feature was added to 
the Python wrapping, you mean to the C/C++ code built on top of the 
macros and compiled to create the library that the python code calls?
That may be a piece of code I'd like to give a look to.


Thanks
André


_______________________________________________
Pokersource-users mailing list
[email protected]
https://mail.gna.org/listinfo/pokersource-users

Reply via email to