Skip to content

ashelly/PET

Repository files navigation

Poker Evaluator Testbed

##PET: A Roundup and Speed Comparison of Seven Card Poker Hand Evaluators


##What's This? A open test framework and speed comparison of seven card poker hand evaluators in C and C++. Measuring the state-of-the art in open-source hand evaluators. Inspired by James Devlin's apparently defunct five card roundup at CodingTheWheel.

##What do I do with it?

  1. View existing results

    Sample Results

  2. Contribute test results from your machine

  3. Add more evaluators

  4. Create more test scenarios.

##How does it work?

The framework provides a C adaptor for each evaluator to give it a uniform interface. Each Evaluator Under Test (EUT) is assigned a unique 3 letter abbreviation, and implements the api defined in PET_evaluator.h. A set of macros in that header translates the API names to the evaluator's names so that we can use the same test harness for all of them. See Interface.md for more details

It runs each evaluator through two tests, and times the performance for:

  • Enumerating every possible 7 card hand.
  • This test includes the cost of adding cards to the hand.
  • Enumerating lots (50,000,000 by default) of random hands.
  • This one creates the hands and calls addcard outside the timing loop.

There is a script to collect and plot the results. python plot.py trials

Evaluators Tested:

Coming In The Future

Licence

The PET code is open source, available under the terms of the MIT License (see LICENSE). Individual evaluators are licenced under their original terms, see README files in each subidrectory.