Extending redeal
I am adding a lot of new criterias used for selecting a deal.
It is not clear for me, which should be part of redeal, and which I should keep in my own code, and the line between properties (hcp, qp etc) and functions (balanced, losers, etc) doesn't seem clear.
I am sure you can improve my implementation, but let me know if you are interested in adding some of it to redeal
I am not really actively developing redeal anymore (I guess I'll try to maintain it in a working state but no more than that); the feature set is essentially based on what was present in the original tcl deal. I would suggest that you just fork the project if you want to add many features to it.
I have forked it, so you can later take a look and see if there is anything you want to add.
But I had some trouble of defining Shape for 10-card suits, and it would be nice to some way of specifying a singlesuited hand.
What do you exactly want to specify?
I want to specify a onesuited hand along with other handtypes
This is working fine, but will never find a hand with a 10-card suit
I was thinking about using l1
Smartstacking (https://github.com/anntzer/redeal?tab=readme-ov-file#smartstacking) may help for very rare hand types.
Yes, but I am creating logic for bidding, and then the logic is input for the handgenerator to generate samples, so I am not aiming at rare handtypes, I just need to be sure, they are possible.
But we seem to have a general problem with shape, not just redeal but in general, perhaps we should use Hex.
I don't actually understand the following statement
But we seem to have a general problem with shape, not just redeal but in general, perhaps we should use Hex.
How do you write a shape, where you have more than 9 cards in a suit?
"T" is 10, "J" is 11, "Q" is 12, "K" is 13. Pushed a fix to clarify this in the docs.
So I can write Shape("(Txxx)") to find any 10-card suit :-)
Yes.
I'll assume the relevant questions have been dealt with, so I'll close the issue, but feel free to ping again if you have more questions.
@ThorvaldAagaard For your example you can use Shape.from_cond. Sth like:
def very_long_one_suited(s, h, d, c):
shape = [s, h, d, c]
shape.sort()
if shape[3] < 7:
return False
else:
return shape[3] - shape[2] > 4
Shape.from_cond(very_long_one_suited)