Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5 best cards dont win.. #68

Open
Simi2437 opened this issue Sep 26, 2018 · 8 comments
Open

5 best cards dont win.. #68

Simi2437 opened this issue Sep 26, 2018 · 8 comments

Comments

@Simi2437
Copy link

Simi2437 commented Sep 26, 2018

There is an issue that if two Players have the same 5 best cards but one of them has a higher handcard he win. But thats not right cause just the highest 5 cards are important for winning so it should be split between that. Saw it on a straight in middle cards, so all had the same straight but the bot with the highest cards won.

@Simi2437
Copy link
Author

I have corrected your code in kind of youre Style.

@allenfrostline
Copy link

@Simi2437 Hi can you share your fix here? I encounter the same issue with the current version///

@Simi2437
Copy link
Author

@allenfrostline im not shure anymore if I have that code. I can search for it if the following is no opinion to you. I remember that this Cardevaluater was realy slow too and switcht to deuces Cardevaluater. So I believe it whould be better using a other solution.

@allenfrostline
Copy link

@Simi2437 Thanks. Also, agree on the speed thing. I'm currently trying to rewrite the evaluation in treys, which is a py3-equivalence of deuces. It'd be great if you could find the code or just tell me the logic you changed in the game evaluation part.

@Simi2437
Copy link
Author

Simi2437 commented Jul 17, 2019

@allenfrostline a fast look at the code let me think, that the problem is in hand_evaluater.py there is the eval_hand function. This allways include the score of the two handcards in the lower signifikant bits. That causes that if you have a straight, that score is right, get shifted 8 bits left and than the score of the to hand cards add up to that, this causes the problem. So you have to change it so that if its a straight, a full house etc where just the 5 highest cards count the first 8 bits should be 0 or the same value in some way.

So a simple if should work, or you change all the eval funktions to handle the handcards by themselves.

@Simi2437
Copy link
Author

There was a other failure too if i remember right. Ass 2 3 4 5 dont work am i right ? You maby have to change this too if you want to use that evaluator

@allenfrostline
Copy link

@Simi2437 Thanks a lot! I fixed the A-5 straight problem yesterday.

@Simi2437
Copy link
Author

Just thinking this hole idea of use handcards in the first 8 bit makes no sense. You have to override all eval hands anyways and use the first 8 bit for real highcardhandling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants