SourceForge                             Logo

Rules Application

    by Jeff Lotspiech

This application is invoked as follows:

    java com.lotspiech.poker.strategy.Rules strategy-file rules-file

The strategy file is the binary file you previously created using the strategy application. The rules file is a file you create manually. You list hand patterns, in the order in which you should play them. This application will tell you how close your strategy is to the optimal strategy, both showing you the hands that differ, and showing you the net return for your strategy.

I devised a language to describe various poker hands. Below is an example optimal strategy for jacks-or-better, to illustrate this "rules language". Here's a quick description of it:
 



t=AKQJT
j=AKQJ
k=KQJT
x=t98765432
s=876
n=987
e=98
{ttttt} - royal flush
{[xxxxx]} - straight flush
{tttt}  - 4 cards to royal flush
(xxxx)x - four of a kind
(xxx)(xx) - full house
{xxxxx} - pat flush
[xxxxx] - pat straight
(xxx) - three of a kind
(xx)(xx) - two pair
{[xx.xx]} - four cards to SF
(jj) - jacks or better
{jjj} - 3 cards to royal flush
{[Aj..T]}~|[x]|
{kkk} - 3 cards to royal flush, no Ace
{xxxx} - 4 cards to a flush
{ttt} - 3 cards to royal flush
KQJT - better than pair
(xx) - SLP: shitty little pair
[xxxx] - outside straight
{[jj.x]} - inside SF w/2 winners
{[j.xx]} - Inside SF w/1 winner
{[jj..x]} - DI SF w/2 winners
{[xxx]} - outside SF
{QJ}~|9|~|{x}|
AKQJ
{jj} - two winners to a royal straight
{QT8}~|J|
{JT7}
tttt - 4 cards to a royal straight
{Q98}KJ=>KQJ9
{[j.x.x]} - double inside SF w/1 winner
KQJ9 - inside straight w/3 winners
{[x.xx]}
{JT}~|Q|~|K{x}|
{QT}~|J|~|{x}|~|K|
KQJ
QJ
KQ
KJ
jj - two winners with an Ace
{JT}
{QT}
{KT}~|9{x}|
j - one high card
{[x.x.x]}
# - draw 5 cards