3

just finished writing a five card poker hand evaluator in C++. now im looking for a new project about the same level of difficulty. maybe a very simple DOS command parser?

TheFuzz
  • 2,607
  • 6
  • 29
  • 48

5 Answers5

7

It sounds like you might be interested in the type of problems Project Euler offers. In particular, it sounds like you have a solution for Problem 54 already.

Greg Hewgill
  • 951,095
  • 183
  • 1,149
  • 1,285
2

Try a calculator, one that takes a full formula, evaluates it and gives the result.

(96+123)/3-56^2+45*2

Leo Jweda
  • 2,481
  • 3
  • 23
  • 34
1

Are you done yet? Why not write a 7-card evaluator, first using your 5-card evaluator and then find a direct way that does not require the 21 checks per evaluation? The latter is a challenge in caching and memory management! There are many sources of inspiration to be found online -- check out Coding-The-Wheel to get started, for instance.

Ken
  • 30,811
  • 34
  • 116
  • 155
0

Extend your hand evaluator to have more inputs - like being able to dynamically calculate strength should it know another hands worth of cards. From there, extend further to calculate strength based on knowing N hands. With this, you're half way to a very nice poker-bot - capable of working with other instances of itself against other players.

:D

Gabriel
  • 1,253
  • 13
  • 16
0

Complete source code for Texas hold'em poker game evaluator can be found here:

http://www.advancedmcode.org/poker-predictor.html

It is built for matlab, the GUI id m-coded but the computational engine is c++.

It allows for odds and probability calculation. It can deal, on my 2.4Ghz laptop, with a 100000 10 players game computation in 0,3 seconds.

An accurate real time computer:-)