Loic Dachary wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>> 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?
>>
> The fill_pockets argument is for the winners method, not the
> poker_eval method. It is related to it though and the "iterations"
> section documents the behaviour of the poker_eval method when a
> placeholder (255 or __) is set instead of a card value.
>> 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.
>>
>>
>>
> You are absolutely correct. I modified the documentation to be a lot
> more verbose.
>
> http://svn.gna.org/viewcvs/pokersource/trunk/pypoker-eval/pokereval.py?rev=3966&view=auto
>
> Do you think it will help understand the purpose of the fill_pocket
> argument ?
Yes. Very good.
But now that I started reading, let me complain about something else :D
In
def poker_eval(self, *args, **kwargs):
the example
Example: [ ["tc", "ac"], ["3h", "ah"], ["8c", "6h"]]
does not mention pocket cards. I'd suggest adding one example with, as
the only place where placeholders are mentioned is in the explanation of
fill_iterations.
I'd suggest adding, just before the example; something along the lines
of the following:
Cards do not have to be real cards like "tc" or "4s". They may also be a
placeholder, denoted by __ or 255. However, when using placeholders, the
argument "iterations" must be specified.
Example1: [ ["tc", "ac"], ["3h", "ah"], ["8c", "6h"]]
Example2: [ ["tc", "__"], ["255", "ah"], ["8c", "6h"]]
In the explanation of the "iteration" argument, it says that iteration
needs to be specified if there are some placeholders being used. It also
says:
Default: +infinite (i.e. exhaustive exploration). This seems rather
contradictory to me.
>> 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.
> Your interpretation is correct. And the corresponding code is here :
>
> http://svn.gna.org/viewcvs/pokersource/trunk/pypoker-eval/pypokereval.c?rev=3483&view=auto
Thanks.
--
André
_______________________________________________
Pokersource-users mailing list
[email protected]
https://mail.gna.org/listinfo/pokersource-users