Is it possible to see the distribution of the winning hand types from 'calculate_hand_strength'?
Closed this issue · 5 comments
Hi everyone, is it possible to see the distribution of hand types when the hand wins from 'calculate_hand_strength'? Eg when the hand won, 10% of the time it was a flush, 20% it was a full house etc.
from concurrent.futures import ProcessPoolExecutor from pokerkit import * with ProcessPoolExecutor() as executor: print(calculate_hand_strength( 3, parse_range('AdJdQhJs'), Card.parse('6d7d6h'), 4, 5, Deck.STANDARD, (pk.hands.OmahaHoldemHand,), sample_count=100_00, executor=executor, ))
No, not at this time, but that would be a very good addition.
I'm quite sure you can modify the existing code to accomplish this.
@AussieSeaweed thank you so much for the info! Do you all accept pushes if I were to work on it?
Also is there a better way for me to ask questions instead of just pushing issues?
Thank you all for this great library and I really appreciate the info and responses
Thank you for your kind words! Creating issues for questions is completely fine. Also, I will be happy to take a look if you do make a PR.
I think a good solution is to allow callers to pass a callback function as an argument which will be called at the end of each simulation. You can use it to generate your distribution.