Giter Site home page Giter Site logo

kennethshackleton / skpokereval Goto Github PK

View Code? Open in Web Editor NEW
232.0 20.0 57.0 3.55 MB

7-card Texas Hold'em hand evaluator

License: Other

C 0.10% C++ 75.51% CMake 0.41% Makefile 1.52% Shell 7.11% Python 14.96% M4 0.40%
texasholdem c-plus-plus evaluator poker skpokereval poker-evaluator poker-hands cpp

skpokereval's People

Contributors

kennethshackleton avatar vpatov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

skpokereval's Issues

dll with exported functions

Not so much an issue as a request..

Is there any way to get your code compiled into a DLL with the functions exported? - I've written a GUI in Clarion :) which shuffles and deals cards for Texas Hold'em (for my own use of course). I would like to be able to simply call your function to compare the cards for two players. 2-pocket cards each and the 5 board cards - so 7 cards per player. A value is then returned and the winner is the one with the highest/lowest value...and then possibly also be able to get the hand type like flush, straight, etc.. Is that do-able at all?

thanks!
W

6 card eval

Hi, my tests show this evaluator is blisteringly fast. Phenomenal work.

Any chance you can add a 6 card version?

Tests Slow

Some of the tests run slow on my machine, is this normal?

Running main() from gtest_main.cc
[==========] Running 19 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 18 tests from FiveEvalTest
[ RUN ] FiveEvalTest.HighCard
[ OK ] FiveEvalTest.HighCard (1 ms)
[ RUN ] FiveEvalTest.WorstPairBeatsBestHighCard
[ OK ] FiveEvalTest.WorstPairBeatsBestHighCard (0 ms)
[ RUN ] FiveEvalTest.Pair
[ OK ] FiveEvalTest.Pair (0 ms)
[ RUN ] FiveEvalTest.WorstTwoPairBeatsBestPair
[ OK ] FiveEvalTest.WorstTwoPairBeatsBestPair (0 ms)
[ RUN ] FiveEvalTest.TwoPair
[ OK ] FiveEvalTest.TwoPair (0 ms)
[ RUN ] FiveEvalTest.WorstTripleBeatsBestTwoPair
[ OK ] FiveEvalTest.WorstTripleBeatsBestTwoPair (0 ms)
[ RUN ] FiveEvalTest.Triple
[ OK ] FiveEvalTest.Triple (0 ms)
[ RUN ] FiveEvalTest.WorstStraightBeatsBestTriple
[ OK ] FiveEvalTest.WorstStraightBeatsBestTriple (0 ms)
[ RUN ] FiveEvalTest.Straight
[ OK ] FiveEvalTest.Straight (0 ms)
[ RUN ] FiveEvalTest.WorstFlushBeatsBestStraight
[ OK ] FiveEvalTest.WorstFlushBeatsBestStraight (0 ms)
[ RUN ] FiveEvalTest.Flush
[ OK ] FiveEvalTest.Flush (0 ms)
[ RUN ] FiveEvalTest.WorstFullHouseBeatsBestFlush
[ OK ] FiveEvalTest.WorstFullHouseBeatsBestFlush (0 ms)
[ RUN ] FiveEvalTest.FullHouse
[ OK ] FiveEvalTest.FullHouse (1 ms)
[ RUN ] FiveEvalTest.WorstQuadBeatsBestFullHouse
[ OK ] FiveEvalTest.WorstQuadBeatsBestFullHouse (0 ms)
[ RUN ] FiveEvalTest.Quad
[ OK ] FiveEvalTest.Quad (0 ms)
[ RUN ] FiveEvalTest.WorstStraightFlushBeatsBestQuad
[ OK ] FiveEvalTest.WorstStraightFlushBeatsBestQuad (0 ms)
[ RUN ] FiveEvalTest.StraightFlush
[ OK ] FiveEvalTest.StraightFlush (0 ms)
[ RUN ] FiveEvalTest.SevenCardHand
[ OK ] FiveEvalTest.SevenCardHand (116314 ms)
[----------] 18 tests from FiveEvalTest (116316 ms total)

[----------] 1 test from SevenEvalTest
[ RUN ] SevenEvalTest.CompareWithFiveEval
[ OK ] SevenEvalTest.CompareWithFiveEval (72018 ms)
[----------] 1 test from SevenEvalTest (72018 ms total)

[----------] Global test environment tear-down
[==========] 19 tests from 2 test cases ran. (188334 ms total)
[ PASSED ] 19 tests.

This is not an issue

Sorry for abusing your issues list but I don't know where to write.

I'd like to just thank you for your amazing tool.

I wrote something similar (but based on bitboards) and SKPokerEval has been really useful to fix a couple of subtle bugs.

Now that my scoring comparison matches with SKPokerEval , I feel confident I have fully validated my little tool. Thanks again and keep up the good work!

FiveEval large and invalid ranks

I see that FiveEval was moved from the main repo into tests and that would appear that you no longer support it but I have a use case were I would like to evaluate the strength of 5 card poker hands. I have noticed that when evaluating a large number of hands in a row sometimes FiveEval will start returning about 50% of it's results as large invalid scores. Do you have any ideas as to what could be causing this? I have verified that the hands I am passing to FiveEval are valid 5 card poker hands(no duplicates)

Should include rank ranges in the readme

Gaps in the enums introduce entropy to deep learning systems.
I found this useful while making onehots
These are sparse ranges
0 == error
High Card: 49 - 1277
Pair: 1296 - 4137
Two Pair: 4141 - 4995
Three of a Kind: 5004 - 5853
Straight: 5854 - 5863
Flush: 5864 - 7140 -- flushes seem to be uniform across suits, two equal flushes will score the same
Full House: 7141 - 7296
Four of a Kind: 7297 - 7452
Straight Flush: 7453 - 7461
Royal Flush: 7462 - 7462
//same as straight flush

Total distinct ranks possible:
High Cards: 407
Pair: 1470
Two Pair: 763
Three of a Kind: 575
Straight: 10
Flush: 1277
Full House: 156
Four of a Kind: 156
Straight Flush: 10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.