See here for details on how PQL Spreadsheets work
To process a PQL CSV file, use the following command:
java -cp p2.jar propokertools.cli.RunPQLCSV
To generate a PQL CSV template, use the following command:
java -cp p2.jar propokertools.cli.GenerateCSVTemplate
All of the examples on this page were run on Linux.
ppt> cat my.csv
#QUERY#,#HAND#
"select count(handType(hero, flop) = fullhouse) as floppedHouse from game='holdem', hero='#HAND#'",
,TT
,this is not a hand and gives an error
,KJ
ppt> java -cp p2.jar propokertools.cli.RunPQLCSV my.csv
Writing results to my-output-1.csv ...
2 rows succeeded 1 row failed
Done.
ppt> cat my-output-1.csv
"#QUERY#",#HAND#,!ERRORS!,!TRIALS!,FLOPPEDHOUSE
"SELECT COUNT(HANDTYPE(HERO, FLOP) = FULLHOUSE) AS FLOPPEDHOUSE FROM GAME='HOLDEM', HERO='#HAND#'",,,,
"",TT,,600000,5867
"",this is not a hand and gives an error,Error - Couldn't parse hand for player HERO: Too many cards in range - expected 2 but got 22,0,
"",KJ,,600000,575
Executing RunPQLCSV without arguments will give you a list of command-line options:
ppt> java -cp p2.jar propokertools.cli.RunPQLCSV
Usage - RunPQLCSV file [-options]
Options include:
-mt max-trials per row (default 600000)
-ms max-seconds per row (default 10)
-tc thread-count (default number-of-cores-on-your-system)
-s silent (turns off command-line status notifications)
Examples:
RunPQLCSV my.csv
RunPQLCSV my.csv -mt 1000000 -ms 60 -tc 2
RunPQLCSV my.csv -s
ppt> java -cp p2.jar propokertools.cli.GenerateCSVTemplate holdem -all
Generating template file holdem-all1.csv ...
Done.
ppt> head holdem-all1.csv
"#QUERY#",#PLAYER1HAND#
"select avg(riverEquity(player1)) as player1Equity from game='holdem', player1='#PLAYER1HAND#', player2='**'",
"",3c2c
"",4c2c
"",5c2c
"",6c2c
"",7c2c
"",8c2c
"",9c2c
"",Tc2c
ppt> java -cp p2.jar propokertools.cli.GenerateCSVTemplate holdem -classes
Generating template file holdem-classes1.csv ...
Done.
ppt> head holdem-classes1.csv
"#QUERY#",#PLAYER1HAND#
"select avg(riverEquity(player1)) as player1Equity from game='holdem', player1='#PLAYER1HAND#', player2='**'",
"",3x2x
"",4x2x
"",5x2x
"",6x2x
"",7x2x
"",8x2x
"",9x2x
"",Tx2x
Executing GenerateCSVTemplate without arguments will give you a list of command-line options:
ppt> java -cp p2.jar propokertools.cli.GenerateCSVTemplate
Usage - GenerateCSVTemplate gameorflop [-option]
Options include:
-all (default - generates all hands/flops)
-isomorphs (removes equivalent entries (ex: AsKs, AdKd) from list)
-classes (generates range classes - example, AxKx, AxKy, AxQx...)
Examples:
GenerateCSVTemplate holdem
GenerateCSVTemplate flop -isomorphs
GenerateCSVTemplate omahahi -classes