openppl - the manual - documentation.help · what is openppl ppl is an acronym for poker...
TRANSCRIPT
ThankYou!Abig“thankyou!”goestoeverybody,whohelpedustocreateOpenPPLandthisdocument:
AmstadBob4567CakeWalkChuckNeverMuckCoolBotMe123CrumbleSundayChuckstaDr.KaktuzEfuFn101GeckoJConnerJohnnyJokeDokeKaeKruseKyoLavezziMariano268MerzkiyTiponMorelloMrRuderNarfalNik0NPNGPastorPokerPoker_DogPostenjakQwertyRambamRelhbyR2D2
SalemSatanikutStangelnatorSteveG1963StriklesSuperBlakTheHighFishThemAndMeTrishWant2LearnZolp
andtoeverybodywehaveforgotten.Withoutyourhelpitwouldnothavebeenpossibletocreatethismanual.Pleasecontactusatwww.maxinmontreal.com/forums,ifyoumissyournameonthelist.
WhatIsOpenPPLPPLisanacronymforPokerProgrammingLanguage,alanguagetoprogrampokerbots.ItwasinventedbyShankyBonusBotstoeasethecustomizationoftheirproprietarybot-logic.Onedayanunnamedherodecidedtogiveawayhis“80%workingtranslator”totheOpenHoldemcommunity.SoOpenPPLwasbornandafteralongperiodofdevelopmentOpenPPLfinallygotcompletelyintegratedintoOpenHoldem.WhereasthefirstversionofOpenPPLneededtobetranslatedtoOH-script,OpenHoldemdoesnownativelysupportplain-textOpenPPLwithoutanytranslationsteps.SoOpenPPLnowcombinesthebestofbothworldsevenbetter:easinessofprogrammingandmightypotentialatthetables.
TheAdvantageOfOpenPPL
OfcourseOpenPPLsupportsthemainfeaturesofPPL,especially:
aneasyEnglish-likeprogramminglanguage,thatcanbelearnedinnotime.alibraryofseveralhundredready-to-usefunctionsforaneasystart.
BesidesthatOpenHoldem&OpenPPLprovidesomeadditionalcoolfunctionalitythatyoumighthavemissedifyouhaveusedotherbotsinthepast:
knowingthestacksizeofeverysingleplayer.theabilitytoplayatanycasinoyouwant,providedyoucreateatablemapforit.theabilitytodevelopanddebugyourbotwithtoolslikeManualMode,PokerAcademyandPokerTH.DidyoueverwanttosimulateA2oatthebuttonoraflushdrawoutofpositionseveraldozentimesuntilyouaresatisfied?anauto-connector,thathandlesupto25tablesatoncewithlessthan1%CPU-overhead.Allyouhavetodo:openatableandsit-down.OpenHoldemconnectsautomatically(oneinstancepertable)andstartstoplay.abilitytousePokerTrackerstatsdirectlyinyourOpenPPL-code.
Butifyouareanexpertyoumightwanttomakeuseofsomeadvancedfeatures:
buildingsymbolsonyourown.accessingOpenholdem’snativesymbolsanddoinghand-rangecalculationsonthefly.
Andthebestofall:
youcancontributetotheprojecttomakeitevenbetter.it’sallforfree.Well—nearlyfree;ofcourseitrequiresabitoflearningandsomeworktobecomeamaster.
Welcometotheworldofopensource!
DocumentgeneratedbyeLyXer1.2.5(2013-03-10)on2015-09-
29T21:35:37.750000
GNUGENERALPUBLICLICENSE
Version3,29June2007
Copyright©2007FreeSoftwareFoundation,Inc.<http://fsf.org/>
Everyoneispermittedtocopyanddistributeverbatimcopiesofthislicensedocument,butchangingitisnotallowed.
Preamble
TheGNUGeneralPublicLicenseisafree,copyleftlicenseforsoftwareandotherkindsofworks.
Thelicensesformostsoftwareandotherpracticalworksaredesignedtotakeawayyourfreedomtoshareandchangetheworks.Bycontrast,theGNUGeneralPublicLicenseisintendedtoguaranteeyourfreedomtoshareandchangeallversionsofaprogram--tomakesureitremainsfreesoftwareforallitsusers.We,theFreeSoftwareFoundation,usetheGNUGeneralPublicLicenseformostofoursoftware;itappliesalsotoanyotherworkreleasedthiswaybyitsauthors.Youcanapplyittoyourprograms,too.
Whenwespeakoffreesoftware,wearereferringtofreedom,notprice.OurGeneralPublicLicensesaredesignedtomakesurethatyouhavethefreedomtodistributecopiesoffreesoftware(andchargeforthemifyouwish),thatyoureceivesourcecodeorcangetitifyouwantit,thatyoucanchangethesoftwareorusepiecesofitinnewfreeprograms,andthatyouknowyoucandothesethings.
Toprotectyourrights,weneedtopreventothersfromdenyingyoutheserightsoraskingyoutosurrendertherights.Therefore,youhavecertainresponsibilitiesifyoudistributecopiesofthesoftware,orifyoumodifyit:responsibilitiestorespectthefreedomofothers.
Forexample,ifyoudistributecopiesofsuchaprogram,whethergratisorforafee,youmustpassontotherecipientsthesamefreedomsthatyoureceived.Youmustmakesurethatthey,too,receiveorcangetthesourcecode.Andyoumustshowthemthesetermssotheyknowtheirrights.
DevelopersthatusetheGNUGPLprotectyourrightswithtwosteps:(1)assertcopyrightonthesoftware,and(2)offeryouthisLicensegivingyoulegalpermissiontocopy,distributeand/ormodifyit.
Forthedevelopers'andauthors'protection,theGPLclearlyexplainsthatthereisnowarrantyforthisfreesoftware.Forbothusers'andauthors'sake,theGPLrequiresthatmodifiedversionsbemarkedaschanged,sothattheirproblemswillnotbeattributederroneouslytoauthorsofpreviousversions.
Somedevicesaredesignedtodenyusersaccesstoinstallorrunmodifiedversionsofthesoftwareinsidethem,althoughthemanufacturercandoso.Thisisfundamentallyincompatiblewiththeaimofprotectingusers'freedomtochangethesoftware.Thesystematicpatternofsuchabuseoccursintheareaofproductsforindividualstouse,whichispreciselywhereitismostunacceptable.Therefore,wehavedesignedthisversionoftheGPLtoprohibitthepracticeforthoseproducts.Ifsuchproblemsarisesubstantiallyinotherdomains,westandreadytoextendthisprovisiontothosedomainsinfutureversionsoftheGPL,asneededtoprotectthefreedomofusers.
Finally,everyprogramisthreatenedconstantlybysoftwarepatents.Statesshouldnotallowpatentstorestrictdevelopmentanduseofsoftwareongeneral-purposecomputers,butinthosethatdo,wewishtoavoidthespecialdangerthatpatentsappliedtoafreeprogramcouldmakeiteffectivelyproprietary.Topreventthis,theGPLassuresthatpatentscannotbeusedtorendertheprogramnon-free.
Theprecisetermsandconditionsforcopying,distributionandmodificationfollow.
TERMSANDCONDITIONS
0.Definitions.
“ThisLicense”referstoversion3oftheGNUGeneralPublicLicense.
“Copyright”alsomeanscopyright-likelawsthatapplytootherkindsofworks,suchassemiconductormasks.
“TheProgram”referstoanycopyrightableworklicensedunderthisLicense.
Eachlicenseeisaddressedas“you”.“Licensees”and“recipients”maybeindividualsororganizations.
To“modify”aworkmeanstocopyfromoradaptallorpartoftheworkinafashionrequiringcopyrightpermission,otherthanthemakingofanexactcopy.Theresultingworkiscalleda“modifiedversion”oftheearlierworkorawork“basedon”theearlierwork.
A“coveredwork”meanseithertheunmodifiedProgramoraworkbasedontheProgram.
To“propagate”aworkmeanstodoanythingwithitthat,withoutpermission,wouldmakeyoudirectlyorsecondarilyliableforinfringementunderapplicablecopyrightlaw,exceptexecutingitonacomputerormodifyingaprivatecopy.Propagationincludescopying,distribution(withorwithoutmodification),makingavailabletothepublic,andinsomecountriesotheractivitiesaswell.
To“convey”aworkmeansanykindofpropagationthatenablesotherpartiestomakeorreceivecopies.Mereinteractionwithauserthroughacomputernetwork,withnotransferofacopy,isnotconveying.
Aninteractiveuserinterfacedisplays“AppropriateLegalNotices”totheextentthatitincludesaconvenientandprominentlyvisiblefeaturethat(1)displaysanappropriatecopyrightnotice,and(2)tellstheuserthatthereisnowarrantyforthework(excepttotheextentthatwarrantiesareprovided),thatlicenseesmayconveytheworkunderthisLicense,andhowtoviewacopyofthisLicense.Iftheinterfacepresentsalistofusercommandsoroptions,suchasamenu,aprominentiteminthelistmeetsthiscriterion.
1.SourceCode.
The“sourcecode”foraworkmeansthepreferredformoftheworkformakingmodificationstoit.“Objectcode”meansanynon-sourceformofawork.
A“StandardInterface”meansaninterfacethateitherisanofficialstandarddefinedbyarecognizedstandardsbody,or,inthecaseofinterfacesspecifiedforaparticularprogramminglanguage,onethatiswidelyusedamongdevelopersworkinginthatlanguage.
The“SystemLibraries”ofanexecutableworkincludeanything,otherthantheworkasawhole,that(a)isincludedinthenormalformofpackagingaMajorComponent,butwhichisnotpartofthatMajorComponent,and(b)servesonlytoenableuseoftheworkwiththatMajorComponent,ortoimplementaStandardInterfaceforwhichanimplementationisavailabletothepublicinsourcecodeform.A“MajorComponent”,inthiscontext,meansamajoressentialcomponent(kernel,windowsystem,andsoon)ofthespecificoperatingsystem(ifany)onwhichtheexecutableworkruns,oracompilerusedtoproducethework,oranobjectcodeinterpreterusedtorunit.
The“CorrespondingSource”foraworkinobjectcodeformmeansallthesourcecodeneededtogenerate,install,and(foranexecutablework)runtheobjectcodeandtomodifythework,includingscriptstocontrolthoseactivities.However,itdoesnotincludethework'sSystemLibraries,orgeneral-purposetoolsorgenerallyavailablefreeprogramswhichareusedunmodifiedinperformingthoseactivitiesbutwhicharenotpartofthework.Forexample,CorrespondingSourceincludesinterfacedefinitionfilesassociatedwithsourcefilesforthework,andthesourcecodeforsharedlibrariesanddynamicallylinkedsubprogramsthattheworkisspecificallydesignedtorequire,suchasbyintimatedatacommunicationorcontrolflowbetweenthosesubprogramsandotherpartsofthework.
TheCorrespondingSourceneednotincludeanythingthatuserscanregenerateautomaticallyfromotherpartsoftheCorrespondingSource.
TheCorrespondingSourceforaworkinsourcecodeformisthatsamework.
2.BasicPermissions.
AllrightsgrantedunderthisLicensearegrantedforthetermofcopyrightontheProgram,andareirrevocableprovidedthestatedconditionsaremet.ThisLicenseexplicitlyaffirmsyourunlimitedpermissiontoruntheunmodifiedProgram.TheoutputfromrunningacoveredworkiscoveredbythisLicenseonlyiftheoutput,givenitscontent,constitutesacoveredwork.ThisLicenseacknowledgesyourrightsoffairuseorotherequivalent,asprovidedbycopyrightlaw.
Youmaymake,runandpropagatecoveredworksthatyoudonotconvey,withoutconditionssolongasyourlicenseotherwiseremainsinforce.Youmay
conveycoveredworkstoothersforthesolepurposeofhavingthemmakemodificationsexclusivelyforyou,orprovideyouwithfacilitiesforrunningthoseworks,providedthatyoucomplywiththetermsofthisLicenseinconveyingallmaterialforwhichyoudonotcontrolcopyright.Thosethusmakingorrunningthecoveredworksforyoumustdosoexclusivelyonyourbehalf,underyourdirectionandcontrol,ontermsthatprohibitthemfrommakinganycopiesofyourcopyrightedmaterialoutsidetheirrelationshipwithyou.
Conveyingunderanyothercircumstancesispermittedsolelyundertheconditionsstatedbelow.Sublicensingisnotallowed;section10makesitunnecessary.
3.ProtectingUsers'LegalRightsFromAnti-CircumventionLaw.
Nocoveredworkshallbedeemedpartofaneffectivetechnologicalmeasureunderanyapplicablelawfulfillingobligationsunderarticle11oftheWIPOcopyrighttreatyadoptedon20December1996,orsimilarlawsprohibitingorrestrictingcircumventionofsuchmeasures.
Whenyouconveyacoveredwork,youwaiveanylegalpowertoforbidcircumventionoftechnologicalmeasurestotheextentsuchcircumventioniseffectedbyexercisingrightsunderthisLicensewithrespecttothecoveredwork,andyoudisclaimanyintentiontolimitoperationormodificationoftheworkasameansofenforcing,againstthework'susers,yourorthirdparties'legalrightstoforbidcircumventionoftechnologicalmeasures.
4.ConveyingVerbatimCopies.
YoumayconveyverbatimcopiesoftheProgram'ssourcecodeasyoureceiveit,inanymedium,providedthatyouconspicuouslyandappropriatelypublishoneachcopyanappropriatecopyrightnotice;keepintactallnoticesstatingthatthisLicenseandanynon-permissivetermsaddedinaccordwithsection7applytothecode;keepintactallnoticesoftheabsenceofanywarranty;andgiveallrecipientsacopyofthisLicensealongwiththeProgram.
Youmaychargeanypriceornopriceforeachcopythatyouconvey,andyoumayoffersupportorwarrantyprotectionforafee.
5.ConveyingModifiedSourceVersions.
YoumayconveyaworkbasedontheProgram,orthemodificationstoproduceitfromtheProgram,intheformofsourcecodeunderthetermsofsection4,providedthatyoualsomeetalloftheseconditions:
a)Theworkmustcarryprominentnoticesstatingthatyoumodifiedit,andgivingarelevantdate.b)TheworkmustcarryprominentnoticesstatingthatitisreleasedunderthisLicenseandanyconditionsaddedundersection7.Thisrequirementmodifiestherequirementinsection4to“keepintactallnotices”.c)Youmustlicensetheentirework,asawhole,underthisLicensetoanyonewhocomesintopossessionofacopy.ThisLicensewillthereforeapply,alongwithanyapplicablesection7additionalterms,tothewholeofthework,andallitsparts,regardlessofhowtheyarepackaged.ThisLicensegivesnopermissiontolicensetheworkinanyotherway,butitdoesnotinvalidatesuchpermissionifyouhaveseparatelyreceivedit.d)Iftheworkhasinteractiveuserinterfaces,eachmustdisplayAppropriateLegalNotices;however,iftheProgramhasinteractiveinterfacesthatdonotdisplayAppropriateLegalNotices,yourworkneednotmakethemdoso.
Acompilationofacoveredworkwithotherseparateandindependentworks,whicharenotbytheirnatureextensionsofthecoveredwork,andwhicharenotcombinedwithitsuchastoformalargerprogram,inoronavolumeofastorageordistributionmedium,iscalledan“aggregate”ifthecompilationanditsresultingcopyrightarenotusedtolimittheaccessorlegalrightsofthecompilation'susersbeyondwhattheindividualworkspermit.InclusionofacoveredworkinanaggregatedoesnotcausethisLicensetoapplytotheotherpartsoftheaggregate.
6.ConveyingNon-SourceForms.
Youmayconveyacoveredworkinobjectcodeformunderthetermsofsections4and5,providedthatyoualsoconveythemachine-readableCorrespondingSourceunderthetermsofthisLicense,inoneoftheseways:
a)Conveytheobjectcodein,orembodiedin,aphysicalproduct(includingaphysicaldistributionmedium),accompaniedbytheCorrespondingSourcefixedonadurablephysicalmediumcustomarilyusedforsoftware
interchange.b)Conveytheobjectcodein,orembodiedin,aphysicalproduct(includingaphysicaldistributionmedium),accompaniedbyawrittenoffer,validforatleastthreeyearsandvalidforaslongasyouoffersparepartsorcustomersupportforthatproductmodel,togiveanyonewhopossessestheobjectcodeeither(1)acopyoftheCorrespondingSourceforallthesoftwareintheproductthatiscoveredbythisLicense,onadurablephysicalmediumcustomarilyusedforsoftwareinterchange,forapricenomorethanyourreasonablecostofphysicallyperformingthisconveyingofsource,or(2)accesstocopytheCorrespondingSourcefromanetworkserveratnocharge.c)ConveyindividualcopiesoftheobjectcodewithacopyofthewrittenoffertoprovidetheCorrespondingSource.Thisalternativeisallowedonlyoccasionallyandnoncommercially,andonlyifyoureceivedtheobjectcodewithsuchanoffer,inaccordwithsubsection6b.d)Conveytheobjectcodebyofferingaccessfromadesignatedplace(gratisorforacharge),andofferequivalentaccesstotheCorrespondingSourceinthesamewaythroughthesameplaceatnofurthercharge.YouneednotrequirerecipientstocopytheCorrespondingSourcealongwiththeobjectcode.Iftheplacetocopytheobjectcodeisanetworkserver,theCorrespondingSourcemaybeonadifferentserver(operatedbyyouorathirdparty)thatsupportsequivalentcopyingfacilities,providedyoumaintaincleardirectionsnexttotheobjectcodesayingwheretofindtheCorrespondingSource.RegardlessofwhatserverhoststheCorrespondingSource,youremainobligatedtoensurethatitisavailableforaslongasneededtosatisfytheserequirements.e)Conveytheobjectcodeusingpeer-to-peertransmission,providedyouinformotherpeerswheretheobjectcodeandCorrespondingSourceoftheworkarebeingofferedtothegeneralpublicatnochargeundersubsection6d.
Aseparableportionoftheobjectcode,whosesourcecodeisexcludedfromtheCorrespondingSourceasaSystemLibrary,neednotbeincludedinconveyingtheobjectcodework.
A“UserProduct”iseither(1)a“consumerproduct”,whichmeansanytangiblepersonalpropertywhichisnormallyusedforpersonal,family,orhouseholdpurposes,or(2)anythingdesignedorsoldforincorporationintoadwelling.Indeterminingwhetheraproductisaconsumerproduct,doubtfulcasesshallbe
resolvedinfavorofcoverage.Foraparticularproductreceivedbyaparticularuser,“normallyused”referstoatypicalorcommonuseofthatclassofproduct,regardlessofthestatusoftheparticularuserorofthewayinwhichtheparticularuseractuallyuses,orexpectsorisexpectedtouse,theproduct.Aproductisaconsumerproductregardlessofwhethertheproducthassubstantialcommercial,industrialornon-consumeruses,unlesssuchusesrepresenttheonlysignificantmodeofuseoftheproduct.
“InstallationInformation”foraUserProductmeansanymethods,procedures,authorizationkeys,orotherinformationrequiredtoinstallandexecutemodifiedversionsofacoveredworkinthatUserProductfromamodifiedversionofitsCorrespondingSource.Theinformationmustsufficetoensurethatthecontinuedfunctioningofthemodifiedobjectcodeisinnocasepreventedorinterferedwithsolelybecausemodificationhasbeenmade.
Ifyouconveyanobjectcodeworkunderthissectionin,orwith,orspecificallyforusein,aUserProduct,andtheconveyingoccursaspartofatransactioninwhichtherightofpossessionanduseoftheUserProductistransferredtotherecipientinperpetuityorforafixedterm(regardlessofhowthetransactionischaracterized),theCorrespondingSourceconveyedunderthissectionmustbeaccompaniedbytheInstallationInformation.ButthisrequirementdoesnotapplyifneitheryounoranythirdpartyretainstheabilitytoinstallmodifiedobjectcodeontheUserProduct(forexample,theworkhasbeeninstalledinROM).
TherequirementtoprovideInstallationInformationdoesnotincludearequirementtocontinuetoprovidesupportservice,warranty,orupdatesforaworkthathasbeenmodifiedorinstalledbytherecipient,orfortheUserProductinwhichithasbeenmodifiedorinstalled.Accesstoanetworkmaybedeniedwhenthemodificationitselfmateriallyandadverselyaffectstheoperationofthenetworkorviolatestherulesandprotocolsforcommunicationacrossthenetwork.
CorrespondingSourceconveyed,andInstallationInformationprovided,inaccordwiththissectionmustbeinaformatthatispubliclydocumented(andwithanimplementationavailabletothepublicinsourcecodeform),andmustrequirenospecialpasswordorkeyforunpacking,readingorcopying.
7.AdditionalTerms.
“Additionalpermissions”aretermsthatsupplementthetermsofthisLicensebymakingexceptionsfromoneormoreofitsconditions.AdditionalpermissionsthatareapplicabletotheentireProgramshallbetreatedasthoughtheywereincludedinthisLicense,totheextentthattheyarevalidunderapplicablelaw.IfadditionalpermissionsapplyonlytopartoftheProgram,thatpartmaybeusedseparatelyunderthosepermissions,buttheentireProgramremainsgovernedbythisLicensewithoutregardtotheadditionalpermissions.
Whenyouconveyacopyofacoveredwork,youmayatyouroptionremoveanyadditionalpermissionsfromthatcopy,orfromanypartofit.(Additionalpermissionsmaybewrittentorequiretheirownremovalincertaincaseswhenyoumodifythework.)Youmayplaceadditionalpermissionsonmaterial,addedbyyoutoacoveredwork,forwhichyouhaveorcangiveappropriatecopyrightpermission.
NotwithstandinganyotherprovisionofthisLicense,formaterialyouaddtoacoveredwork,youmay(ifauthorizedbythecopyrightholdersofthatmaterial)supplementthetermsofthisLicensewithterms:
a)Disclaimingwarrantyorlimitingliabilitydifferentlyfromthetermsofsections15and16ofthisLicense;orb)RequiringpreservationofspecifiedreasonablelegalnoticesorauthorattributionsinthatmaterialorintheAppropriateLegalNoticesdisplayedbyworkscontainingit;orc)Prohibitingmisrepresentationoftheoriginofthatmaterial,orrequiringthatmodifiedversionsofsuchmaterialbemarkedinreasonablewaysasdifferentfromtheoriginalversion;ord)Limitingtheuseforpublicitypurposesofnamesoflicensorsorauthorsofthematerial;ore)Decliningtograntrightsundertrademarklawforuseofsometradenames,trademarks,orservicemarks;orf)Requiringindemnificationoflicensorsandauthorsofthatmaterialbyanyonewhoconveysthematerial(ormodifiedversionsofit)withcontractualassumptionsofliabilitytotherecipient,foranyliabilitythatthesecontractualassumptionsdirectlyimposeonthoselicensorsandauthors.
Allothernon-permissiveadditionaltermsareconsidered“furtherrestrictions”withinthemeaningofsection10.IftheProgramasyoureceivedit,oranypart
ofit,containsanoticestatingthatitisgovernedbythisLicensealongwithatermthatisafurtherrestriction,youmayremovethatterm.IfalicensedocumentcontainsafurtherrestrictionbutpermitsrelicensingorconveyingunderthisLicense,youmayaddtoacoveredworkmaterialgovernedbythetermsofthatlicensedocument,providedthatthefurtherrestrictiondoesnotsurvivesuchrelicensingorconveying.
Ifyouaddtermstoacoveredworkinaccordwiththissection,youmustplace,intherelevantsourcefiles,astatementoftheadditionaltermsthatapplytothosefiles,oranoticeindicatingwheretofindtheapplicableterms.
Additionalterms,permissiveornon-permissive,maybestatedintheformofaseparatelywrittenlicense,orstatedasexceptions;theaboverequirementsapplyeitherway.
8.Termination.
YoumaynotpropagateormodifyacoveredworkexceptasexpresslyprovidedunderthisLicense.Anyattemptotherwisetopropagateormodifyitisvoid,andwillautomaticallyterminateyourrightsunderthisLicense(includinganypatentlicensesgrantedunderthethirdparagraphofsection11).
However,ifyouceaseallviolationofthisLicense,thenyourlicensefromaparticularcopyrightholderisreinstated(a)provisionally,unlessanduntilthecopyrightholderexplicitlyandfinallyterminatesyourlicense,and(b)permanently,ifthecopyrightholderfailstonotifyyouoftheviolationbysomereasonablemeanspriorto60daysafterthecessation.
Moreover,yourlicensefromaparticularcopyrightholderisreinstatedpermanentlyifthecopyrightholdernotifiesyouoftheviolationbysomereasonablemeans,thisisthefirsttimeyouhavereceivednoticeofviolationofthisLicense(foranywork)fromthatcopyrightholder,andyoucuretheviolationpriorto30daysafteryourreceiptofthenotice.
TerminationofyourrightsunderthissectiondoesnotterminatethelicensesofpartieswhohavereceivedcopiesorrightsfromyouunderthisLicense.Ifyourrightshavebeenterminatedandnotpermanentlyreinstated,youdonotqualifytoreceivenewlicensesforthesamematerialundersection10.
9.AcceptanceNotRequiredforHavingCopies.
YouarenotrequiredtoacceptthisLicenseinordertoreceiveorrunacopyoftheProgram.Ancillarypropagationofacoveredworkoccurringsolelyasaconsequenceofusingpeer-to-peertransmissiontoreceiveacopylikewisedoesnotrequireacceptance.However,nothingotherthanthisLicensegrantsyoupermissiontopropagateormodifyanycoveredwork.TheseactionsinfringecopyrightifyoudonotacceptthisLicense.Therefore,bymodifyingorpropagatingacoveredwork,youindicateyouracceptanceofthisLicensetodoso.
10.AutomaticLicensingofDownstreamRecipients.
Eachtimeyouconveyacoveredwork,therecipientautomaticallyreceivesalicensefromtheoriginallicensors,torun,modifyandpropagatethatwork,subjecttothisLicense.YouarenotresponsibleforenforcingcompliancebythirdpartieswiththisLicense.
An“entitytransaction”isatransactiontransferringcontrolofanorganization,orsubstantiallyallassetsofone,orsubdividinganorganization,ormergingorganizations.Ifpropagationofacoveredworkresultsfromanentitytransaction,eachpartytothattransactionwhoreceivesacopyoftheworkalsoreceiveswhateverlicensestotheworktheparty'spredecessorininteresthadorcouldgiveunderthepreviousparagraph,plusarighttopossessionoftheCorrespondingSourceoftheworkfromthepredecessorininterest,ifthepredecessorhasitorcangetitwithreasonableefforts.
YoumaynotimposeanyfurtherrestrictionsontheexerciseoftherightsgrantedoraffirmedunderthisLicense.Forexample,youmaynotimposealicensefee,royalty,orotherchargeforexerciseofrightsgrantedunderthisLicense,andyoumaynotinitiatelitigation(includingacross-claimorcounterclaiminalawsuit)allegingthatanypatentclaimisinfringedbymaking,using,selling,offeringforsale,orimportingtheProgramoranyportionofit.
11.Patents.
A“contributor”isacopyrightholderwhoauthorizesuseunderthisLicenseoftheProgramoraworkonwhichtheProgramisbased.Theworkthuslicensedis
calledthecontributor's“contributorversion”.
Acontributor's“essentialpatentclaims”areallpatentclaimsownedorcontrolledbythecontributor,whetheralreadyacquiredorhereafteracquired,thatwouldbeinfringedbysomemanner,permittedbythisLicense,ofmaking,using,orsellingitscontributorversion,butdonotincludeclaimsthatwouldbeinfringedonlyasaconsequenceoffurthermodificationofthecontributorversion.Forpurposesofthisdefinition,“control”includestherighttograntpatentsublicensesinamannerconsistentwiththerequirementsofthisLicense.
Eachcontributorgrantsyouanon-exclusive,worldwide,royalty-freepatentlicenseunderthecontributor'sessentialpatentclaims,tomake,use,sell,offerforsale,importandotherwiserun,modifyandpropagatethecontentsofitscontributorversion.
Inthefollowingthreeparagraphs,a“patentlicense”isanyexpressagreementorcommitment,howeverdenominated,nottoenforceapatent(suchasanexpresspermissiontopracticeapatentorcovenantnottosueforpatentinfringement).To“grant”suchapatentlicensetoapartymeanstomakesuchanagreementorcommitmentnottoenforceapatentagainsttheparty.
Ifyouconveyacoveredwork,knowinglyrelyingonapatentlicense,andtheCorrespondingSourceoftheworkisnotavailableforanyonetocopy,freeofchargeandunderthetermsofthisLicense,throughapubliclyavailablenetworkserverorotherreadilyaccessiblemeans,thenyoumusteither(1)causetheCorrespondingSourcetobesoavailable,or(2)arrangetodepriveyourselfofthebenefitofthepatentlicenseforthisparticularwork,or(3)arrange,inamannerconsistentwiththerequirementsofthisLicense,toextendthepatentlicensetodownstreamrecipients.“Knowinglyrelying”meansyouhaveactualknowledgethat,butforthepatentlicense,yourconveyingthecoveredworkinacountry,oryourrecipient'suseofthecoveredworkinacountry,wouldinfringeoneormoreidentifiablepatentsinthatcountrythatyouhavereasontobelievearevalid.
If,pursuanttoorinconnectionwithasingletransactionorarrangement,youconvey,orpropagatebyprocuringconveyanceof,acoveredwork,andgrantapatentlicensetosomeofthepartiesreceivingthecoveredworkauthorizingthemtouse,propagate,modifyorconveyaspecificcopyofthecoveredwork,thenthepatentlicenseyougrantisautomaticallyextendedtoallrecipientsofthe
coveredworkandworksbasedonit.
Apatentlicenseis“discriminatory”ifitdoesnotincludewithinthescopeofitscoverage,prohibitstheexerciseof,orisconditionedonthenon-exerciseofoneormoreoftherightsthatarespecificallygrantedunderthisLicense.Youmaynotconveyacoveredworkifyouareapartytoanarrangementwithathirdpartythatisinthebusinessofdistributingsoftware,underwhichyoumakepaymenttothethirdpartybasedontheextentofyouractivityofconveyingthework,andunderwhichthethirdpartygrants,toanyofthepartieswhowouldreceivethecoveredworkfromyou,adiscriminatorypatentlicense(a)inconnectionwithcopiesofthecoveredworkconveyedbyyou(orcopiesmadefromthosecopies),or(b)primarilyforandinconnectionwithspecificproductsorcompilationsthatcontainthecoveredwork,unlessyouenteredintothatarrangement,orthatpatentlicensewasgranted,priorto28March2007.
NothinginthisLicenseshallbeconstruedasexcludingorlimitinganyimpliedlicenseorotherdefensestoinfringementthatmayotherwisebeavailabletoyouunderapplicablepatentlaw.
12.NoSurrenderofOthers'Freedom.
Ifconditionsareimposedonyou(whetherbycourtorder,agreementorotherwise)thatcontradicttheconditionsofthisLicense,theydonotexcuseyoufromtheconditionsofthisLicense.IfyoucannotconveyacoveredworksoastosatisfysimultaneouslyyourobligationsunderthisLicenseandanyotherpertinentobligations,thenasaconsequenceyoumaynotconveyitatall.Forexample,ifyouagreetotermsthatobligateyoutocollectaroyaltyforfurtherconveyingfromthosetowhomyouconveytheProgram,theonlywayyoucouldsatisfyboththosetermsandthisLicensewouldbetorefrainentirelyfromconveyingtheProgram.
13.UsewiththeGNUAfferoGeneralPublicLicense.
NotwithstandinganyotherprovisionofthisLicense,youhavepermissiontolinkorcombineanycoveredworkwithaworklicensedunderversion3oftheGNUAfferoGeneralPublicLicenseintoasinglecombinedwork,andtoconveytheresultingwork.ThetermsofthisLicensewillcontinuetoapplytothepartwhichisthecoveredwork,butthespecialrequirementsoftheGNUAfferoGeneral
PublicLicense,section13,concerninginteractionthroughanetworkwillapplytothecombinationassuch.
14.RevisedVersionsofthisLicense.
TheFreeSoftwareFoundationmaypublishrevisedand/ornewversionsoftheGNUGeneralPublicLicensefromtimetotime.Suchnewversionswillbesimilarinspirittothepresentversion,butmaydifferindetailtoaddressnewproblemsorconcerns.
Eachversionisgivenadistinguishingversionnumber.IftheProgramspecifiesthatacertainnumberedversionoftheGNUGeneralPublicLicense“oranylaterversion”appliestoit,youhavetheoptionoffollowingthetermsandconditionseitherofthatnumberedversionorofanylaterversionpublishedbytheFreeSoftwareFoundation.IftheProgramdoesnotspecifyaversionnumberoftheGNUGeneralPublicLicense,youmaychooseanyversioneverpublishedbytheFreeSoftwareFoundation.
IftheProgramspecifiesthataproxycandecidewhichfutureversionsoftheGNUGeneralPublicLicensecanbeused,thatproxy'spublicstatementofacceptanceofaversionpermanentlyauthorizesyoutochoosethatversionfortheProgram.
Laterlicenseversionsmaygiveyouadditionalordifferentpermissions.However,noadditionalobligationsareimposedonanyauthororcopyrightholderasaresultofyourchoosingtofollowalaterversion.
15.DisclaimerofWarranty.
THEREISNOWARRANTYFORTHEPROGRAM,TOTHEEXTENTPERMITTEDBYAPPLICABLELAW.EXCEPTWHENOTHERWISESTATEDINWRITINGTHECOPYRIGHTHOLDERSAND/OROTHERPARTIESPROVIDETHEPROGRAM“ASIS”WITHOUTWARRANTYOFANYKIND,EITHEREXPRESSEDORIMPLIED,INCLUDING,BUTNOTLIMITEDTO,THEIMPLIEDWARRANTIESOFMERCHANTABILITYANDFITNESSFORAPARTICULARPURPOSE.THEENTIRERISKASTOTHEQUALITYANDPERFORMANCEOFTHEPROGRAMISWITHYOU.SHOULDTHEPROGRAMPROVEDEFECTIVE,YOUASSUMETHE
COSTOFALLNECESSARYSERVICING,REPAIRORCORRECTION.
16.LimitationofLiability.
INNOEVENTUNLESSREQUIREDBYAPPLICABLELAWORAGREEDTOINWRITINGWILLANYCOPYRIGHTHOLDER,ORANYOTHERPARTYWHOMODIFIESAND/ORCONVEYSTHEPROGRAMASPERMITTEDABOVE,BELIABLETOYOUFORDAMAGES,INCLUDINGANYGENERAL,SPECIAL,INCIDENTALORCONSEQUENTIALDAMAGESARISINGOUTOFTHEUSEORINABILITYTOUSETHEPROGRAM(INCLUDINGBUTNOTLIMITEDTOLOSSOFDATAORDATABEINGRENDEREDINACCURATEORLOSSESSUSTAINEDBYYOUORTHIRDPARTIESORAFAILUREOFTHEPROGRAMTOOPERATEWITHANYOTHERPROGRAMS),EVENIFSUCHHOLDEROROTHERPARTYHASBEENADVISEDOFTHEPOSSIBILITYOFSUCHDAMAGES.
17.InterpretationofSections15and16.
Ifthedisclaimerofwarrantyandlimitationofliabilityprovidedabovecannotbegivenlocallegaleffectaccordingtotheirterms,reviewingcourtsshallapplylocallawthatmostcloselyapproximatesanabsolutewaiverofallcivilliabilityinconnectionwiththeProgram,unlessawarrantyorassumptionofliabilityaccompaniesacopyofthePrograminreturnforafee.
ENDOFTERMSANDCONDITIONS
HowtoApplyTheseTermstoYourNewPrograms
Ifyoudevelopanewprogram,andyouwantittobeofthegreatestpossibleusetothepublic,thebestwaytoachievethisistomakeitfreesoftwarewhicheveryonecanredistributeandchangeundertheseterms.
Todoso,attachthefollowingnoticestotheprogram.Itissafesttoattachthemtothestartofeachsourcefiletomosteffectivelystatetheexclusionofwarranty;andeachfileshouldhaveatleastthe“copyright”lineandapointertowherethefullnoticeisfound.
<onelinetogivetheprogram'snameandabriefideaofwhatitdoes.>
Copyright(C)<year><nameofauthor>
Thisprogramisfreesoftware:youcanredistributeitand/ormodify
itunderthetermsoftheGNUGeneralPublicLicenseaspublishedby
theFreeSoftwareFoundation,eitherversion3oftheLicense,or
(atyouroption)anylaterversion.
Thisprogramisdistributedinthehopethatitwillbeuseful,
butWITHOUTANYWARRANTY;withouteventheimpliedwarrantyof
MERCHANTABILITYorFITNESSFORAPARTICULARPURPOSE.Seethe
GNUGeneralPublicLicenseformoredetails.
YoushouldhavereceivedacopyoftheGNUGeneralPublicLicense
alongwiththisprogram.Ifnot,see<http://www.gnu.org/licenses/>.
Alsoaddinformationonhowtocontactyoubyelectronicandpapermail.
Iftheprogramdoesterminalinteraction,makeitoutputashortnoticelikethiswhenitstartsinaninteractivemode:
<program>Copyright(C)<year><nameofauthor>
ThisprogramcomeswithABSOLUTELYNOWARRANTY;fordetailstype`showw'.
Thisisfreesoftware,andyouarewelcometoredistributeit
undercertainconditions;type`showc'fordetails.
Thehypotheticalcommands`showw'and`showc'shouldshowtheappropriatepartsoftheGeneralPublicLicense.Ofcourse,yourprogram'scommandsmightbedifferent;foraGUIinterface,youwouldusean“aboutbox”.
Youshouldalsogetyouremployer(ifyouworkasaprogrammer)orschool,ifany,tosigna“copyrightdisclaimer”fortheprogram,ifnecessary.Formoreinformationonthis,andhowtoapplyandfollowtheGNUGPL,see<http://www.gnu.org/licenses/>.
TheGNUGeneralPublicLicensedoesnotpermitincorporatingyourprogramintoproprietaryprograms.Ifyourprogramisasubroutinelibrary,youmayconsideritmoreusefultopermitlinkingproprietaryapplicationswiththelibrary.Ifthisiswhatyouwanttodo,usetheGNULesserGeneralPublicLicenseinsteadofthisLicense.Butfirst,pleaseread<http://www.gnu.org/philosophy/why-not-lgpl.html>.
StructureOfAPPL-FileIfyouhaveusedOpenHoldeminthepastyouwillknowthatyouhavetoanswerseveralquestions:ShallIgoallin?ShallIraise?ShallIcall?AndifyouanswerallquestionswithnothenOpenHoldemwillfold.Thatisoneapproachanditclearlyhassomepros.Butmostpoker-playingpeopleandnon-programerswillfindadifferentapproachmoreeasy:WhatshallIdointhissituation?Andthat’sexactlyhowOpenPPLworks.
SimpleWhenConditionsWithActions
Themostsimplewaytocodeabotconsistsofaseriesofconditionsfollowedbyactionstobechosen.
WHENHaveFlushDrawANDAmountToCall<1/3PotSizeCallFORCE
Theseconditionsarealwaysevaluatedtop-down.Oncethefirstconditionistrue,theappropriateactionwillbetaken.Always!-sotheorderofprogrammingmatters.Let’sassume,thatyouwanttocallyourflushdraws,butraiseto10bbyournut-flushdraws(expert-strategy2012).Thenyouwillhavetowriteyourcommandsinthefollowingorder:
WHENHaveNutFlushDrawRaiseTo10FORCE
WHENHaveFlushDrawCallFORCE
Doittheotherwayandyournut-flush-drawwouldtriggertherulefornormalflush-draws.Acallwouldbetheresult.Asaconsequenceofthistop-down-evaluationwerecommendyoudealwith:
stronghandsfirst,specialcasesfirstweakhandslast,generalcaseslast
Thebotsimplydoesnotknowifoneruleis“morespecial”or“moreimportant”—youhavetotellitbyyourcodingorder.Ifyouwonderaboutthekeywordforce:itwasinheritedfromShanky-PPLandmeans,thatitoverwritesthedefaultbot(withoutForce).Thoughwedon’tprovideadefaultbotanddon’tthink,thatuser-definedactionsshouldbeignorediftheylacktheFORCE,wekeptthiskeywordtostaycompatibleandbecauseitisnicetoread(syntacticalsugar).
Open-EndedWhenConditions
Programmingyourbotwithwhen-conditionsalonewill—inprinciple---dothejob,buttherewillbelotsofsituationsthatareverysimilar.
WHENhand$ATANDStillToAct=2ANDRaises=1ANDAmountToCall<=4RaisePotFORCE
WHENhand$ATANDStillToAct=2ANDRaises=1ANDAmountToCall>4FoldFORCE
WHENhand$ATANDStillToAct=2ANDRaises=2...
Hereonepartoftheconditiongetsrepeated:
WHENhand$ATANDStillToAct=2
Formoresophisticatedprofilesthiswouldbelotsofcodetowrite,lotsofcodetoevaluateandatruenightmaretochangeonceyouwanttoimproveit.SoOpenPPLprovidestwokindsofconditions:top-levelconditionswithoutactions(called“open-endedwhen-conditions”)andsimple“whenconditionswithactions”likeexplainedabove.Oncethefirstopen-ended-when-conditionislocatedallfollowing“normal”when-conditionsareboundtothatconditionandonlyevaluatedwhentheopen-endedwhen-conditionistrue.Soyoucouldrewritetheexampleabovelikethat:
WHENhand$ATANDStillToAct=2
WHENRaises=1ANDAmountToCall<=4RaisePotFORCE
WHENRaises=1ANDAmountToCall>4FoldFORCE
WHENRaises=2...
WHENhand$A9ANDStillToAct=2
...
Eachopen-endedwhen-conditionisactiveuntilthenextopen-endedwhen-conditionisfound.Intheexampleabove:
WHENhand$A9ANDStillToAct=2
Toterminateallyouropen-endedwhen-conditionsjustwrite:
WhenOthers
...
WhenOthersFoldForce
Codingthiswaymakesyourcodesmaller,moreeasytoreadandmoreeasytochange.However:somepeoplewouldliketotakecode-structuringtoextremesandusemultiplenestedopen-endedwhen-conditionslikebelow:
WHENhand$AT
WHENStillToAct=2
WHENRaises=1
WHEN(AmountToCall<=4)RaisePotFORCE
WHEN(AmountToCall>4)FoldFORCE
WHENRaises=2
WHEN...
Inprinciplethisisagoodidea,butitdoesnotwork.Simplybecausethereisnowaytotell,whereoneopen-endedwhen-conditionendsandwherethenextonestarts.Sothesemanticswouldbecompletelyundefined(itisinfactnot,butitisforsurenotwhatyouwant).Sureyoucouldargueaboutindentation,butspaceshavenomeaninginmostprogramminglanguages(exceptgoodoldFortran77)andeverybodydoesitdifferently.Solet’srestate:Thereisatmostonelevelofopen-endedwhen-conditions(withoutaction),eachoneboundtoasequenceofwhen-conditionswithactions.Ifyouwanttostructureyourcodeevenmore(averygoodidea!)thenwerecommendtolookatthechapter“BuildingSymbolsOnYourOwn”.
ControlflowofOpen-EndedWhen-Conditions
StructureOfAPPL-File
Onceyouunderstandhowwhen-conditionswork,programmingyourfirstbotbecomeseasyandstraightforward:youjusthavetoprovideasequenceofwhen-conditionsforPreflop,Flop,TurnandRiver.These4maincode-sectionsarenamedf$preflop..f$river,becausethat’showuser-definedOpenHoldemsymbolsgetnamedandfromatechnicalpointofviewthesecode-sectionsarefunctions.
##f$preflop##
//Thisisacomment
//Yourcodebelongshere.
WHENhand$AARaiseMaxFORCE
WHENhand$KK...
...
WHENOthersFoldFORCE
##f$flop##
##f$turn##
##f$river##
UnspecifiedReturnValues
Peoplewhocreatecompleteprofilesusuallyadd
WHENOthers
WHENOthersFoldFORCE
totheendofeverycode-section.Butitdoesnothurtifyoudon’tso.IfnoconditionmatchesthesituationOpenHoldemwillautomaticallycontinuetoevaluatethebuilt-indefault-not(Gecko).Ifnodefault-botispresent(youmaysafelydeleteit)thenOpenHoldemwillevaluatefunctionswithoutareturn-valuetozero,whichisalsotheencodingforfalse,andalsoforcheck/fold.
MoreAdvancedCoding
Codingsequencesofwhen-conditionsisveryeasyandintuitive,howeverthereisonebigdisadvantage:pokerisasomewhatcomplexgameandtherearecountlesssituationstoconsider.Sothesecode-blockscanbecomeratherlarge—toolargeforasanehumanmind.Butofcoursethereisasolution:OpenPPLsupportsstructuredcoding,namely:
user-definedhand-listsuser-definedsymbols,i.e.namedfunctions,thatgetdefinedonceandcanbeusedatmultipleplaces.
Bothofthemareveryuseful,butalittlebit“advanced”andnotstandardShanky-PPL.Sowediscusstheminlaterchaptersofthismanual.
HandAndBoardExpressionsHandexpressions
Oneofthemostimportantdecisionsofthegamehappenspreflop:shallIplaythishandandhow?Thisdecisioncanbecodedwiththeself-explanatoryhand-expression,likeintheexamplebelow:
WHENhand$AARaiseMaxFORCE
WHENhand$AQSuitedORhand$AJSuitedRaiseTo3FORCE
WHENhand$22ORhand$33ORhand$44...CallFORCE
AKdoesincludebothAKsandAKo.Soifyouwanttoplaysuitedhandsdifferentlyyoushouldcodethemfirst,asOpenPPLgetsevaluatedtopdown.Itwillstopatthefirstconditionthatmatches(evaluatestotrue).Soalwaysremember:stronghandsfirst,exceptionsfirst,badhandslater.
CodingForSpecificSuits
Ifyouwantyoucanalsocodeforspecificsuits,likeanaceofdiamondsinyourhand.Thisisrarelynecessary,butwasusedinthepast(beforerealrandomizationwasintroducedtoStandardPPL)torandomizeactions.
WHENhand$AcQdOrhand$JhTs...
//RandomizeyourAction,theoldway
WHENhand$AdTRaiseTo10FORCE
WHENhand$ATCallFORCE
Butbecarefulwiththecodebelow:
WHENhand$AKs...
Itmeans:anyaceandkingofspades,butnotAKsuited
BoardExpressions
Alotofthegamealsodependsontheboardcards.Therearesymbolslike“HaveStraightDraw”or“FlushPossibleOnTurn“,butforsomecasesmightnotbeconcreteenough.Thereforeitispossibletospecifyboard-statessimilartotheabove:
//Calling,ifanyaceisontheboard
WHENboard$ACallFORCE
//Raising,ifthereisalowpaironboard
WHENboard$22ORboard$33ORboard$44...RaiseTo10FORCE
//Raising,ifthereareAandTofthesamesuit
WHENboard$ATSUITEDRaisePotFORCE
Yousee,thisisprettystraightforward,butsometimeslotsofcodetowrite.Ifyouwanttocreatecodethatiseasytounderstand,easytoreuseandeasytomaintain,thenyoushouldencapsulateexpressionslikethesecondoneinfunctions(placeitwithinitsownfunction):
##f$LowPairOnBoard##
WHENboard$22ORboard$33ORboard$44...RETURNTRUE
User-definedvariableswouldalsobepossible,buttheyarenotnearlyasgoodasfunctions.
DocumentgeneratedbyeLyXer1.2.5(2013-03-10)on2015-01-04T12:29:51.515000
ActionsThemaincodesectionsofOpen-PPLconsistofwhen-conditionswithactions.Theylooke.g.likethis:
##f$preflop##
//Openraisingonthebutton
WHEN(Raises=0andCalls=0andStillToAct=2)
//Normalopenraises
WHEN((Hand$AA)or(Hand$KK)...)RaiseTo3FORCE
//PushingaccordingtoSklanky
WHEN(StackSize<20and((Hand$...)OR...))RaiseMaxFORCE
OpenPPLprovides3kindsofactions:
FixedActions
Exampleslooklike
BetMaxFORCE
RaiseMaxFORCE
AllinFORCE//synonymforBetMaxandRaiseMax,butnostandardPPL
BetPotFORCE
RaisePotFORCE
BetThreeFourthPotFORCE
RaiseThreeFourthPotFORCE
BetTwoThirdPotFORCE
RaiseTwoThirdPotFORCE
BetHalfPotFORCE
RaiseHalfPotFORCE
BetThirdPotFORCE
RaiseThirdPotFORCE
BetFourthPotFORCE
RaiseFourthPotFORCE
BetFORCE//min-bet(fixedlimit)
RaiseFORCE//min-raise(fixedlimit)
BetMinFORCE
RaiseMinFORCE
CallFORCE
CheckFORCE
FoldFORCE
BeepFORCE//beep,butdon’tact
ContrarytostandardPPLOpenPPLdoesnotdistinguishbetsandraises.OpenHoldemtreatsthemexactlythesameway.Pleasenote:SitOutisnolongerasupportedaction.Inouropinionitisbeneficialtoseparateplayinglogicandhopperlogic.ThereforeOpenHoldemprovidessomehopper-functionality,especiallythefunctionsf$sitin,f$sitout,f$leaveandf$close.Pleasealsonote:fixedactionsarefunctionsfromatechnicalpointofview,thereforetheyarecase-sensitive.
ActionsWithFixedBetsize
Exampleslooklike
RaiseTo3.5FORCE
or
RaiseBy2.5FORCE
RaiseTospecifiesyourfinalbetsize,RaiseByspecifiestheamountyouwanttoaddtotheaggressorsbet-amount.
ActionsWithRelativeBetsize
Exampleslooklike
RaiseBy70%FORCE
Herethebetsizegetsmeasuredasacertainpercentageofthepot(pot=commonpot+allplayersbets+theamounttocall).PotsizedbetsarealwaysRaiseBy.
UsingExpressionsForTheBet-Amount
Let’sassumeyouwanttoraiseto3bbinanunraisedpot,plus1bbforeachcaller.WithstandardPPLthiswouldresultinclumsycode.ButwithOpenPPLyoucansimplywrite:
WHEN(Raises=0)RaiseTo(3+Calls)FORCE
Ifyouwantyoucouldtakethistoextremesandwritegoodcodelikethefollowing:
##f$MyFavouriteBetsizeForDryBoards##
...
WHEN(...)RaiseTof$MyFavouriteBetsizeForDryBoardsFORCE
Beingstrict:using“FORCE”
EveryactioninOpenPPLhastobeterminatedbythekeyword“FORCE”.ForstandardPPLthiskeywordwasoptional.Ifyouleftitout,itmeant,thatthebotcontinuedtoevaluateandfinallyfellbacktothedefaultlogic.Wedeviatedfromthatbehaviour,as:
inouropinionitdoesnotmakeanysensetospecifyactionsthathavenoeffect.OpenPPLdoesnotprovideadefaultbot.
Quickfoldingbadhands
Mostpoker-sitesprovidepre-action-buttonstoactbeforeitisyourturn.Especiallyusefulistheprefold-buttonthatmakesitpossibletoclickbadhandsawayandforgetaboutthem.Beingabletoclickthisbuttonwithyourbothasatleasttwopositiveeffects:morehuman-likebehaviourandplayingmorehandsperhourduetofasteractions.Nothingcouldbemoreeasy:
##f$prefold##
WHENAmountToCall>0AND(hand$32ORhand$43OR...)ReturnTrueFORCE
Beawareofpotentiallyunstablegame-states!
Pleasenote:
prefoldgetsevaluatedwhenitisnotyourturn.ThereforeitmighthappenthatOpenHoldemtakesascreenshot,evaluatesandactswhilethecasinoupdatesitstable-displayandthegame-stateisunstable.“Garbagein—garbageout”willhappen.Nowlet’sassumeyouhavesomesuper-nittybot:
##f$prefold##
WHEN(NOT((Hand$AA)OR(Hand$KK)))FoldFORCE
”FoldwhenIdon’thaveagoodhand”.Buthereyourgoodhandcannotgetrecognizedbecauseyouracesgetonlydisplayedpartially.Yourbotwouldfoldpocketaces!Toavoidproblemslikethatitisrecommendtocodemorefail-safelikeinthefirstexample:“FoldwhenIhaveabadhand”.Itwon’thurtthatmuchifthatcommandfailedandworkedonlyonthenextheart-beat-cycle.Thereareevenmoreconsequencesofpotentiallyunstableframes:OpenPPLdoesitsmaincalculationswhenitisyourturn.Especiallysome
morecomplexsymbolswhichdependonthehistoryofthegamegetupdatedonlywhenwehavestableframestoguaranteetheircorrectness—RaisesSinceLastPlayorLastCallerPositionareexamples.Asaconsequencethesesymbolswillsimplybeundefinedbeforeyourfirstactionpreflop.ThereforeitisrecommendedtobeextracarefulabouttheGIGO-principleandsticktothemostbasicsymbolsonly.Butthisisnottoohardforprefold,isit?
Backupactions
Itmayhappen,thatacertainactionisnotavailable,e.g.youmightwanttoraisebyhalfthepot,butthisiscurrentlynotpossible,e.g.becauseyouropponentmadealargeraiseandhalf-potwouldbelessthantheminimum.InsuchsituationsOpenPPLbehavesinthefollowingways:
betsizeinvalid(toolessortoomuch(PotLimitormorethanyourbalance)):betsizegetsautomaticallyadapted.ThishappensalsotoactionslikeRaisePotandRaiseHalfPot,thatgetexecutedwiththef$betsize-function.actioncan’tbeexecuted,becauseitisnotpossible,e.g.theremightbenoraise-button,becauseyoucanonlycall(allin)orfold.HereOpenPPLbehavesinthefollowingway:
RaisePotifRaiseMaxisnotpossibleRaise(Min)ifRaisePotorRaiseHalfPotisnotpossibleCallifnoRaiseispossibleCheckifnoCallispossibleFoldifnoCheckispossible(defaultbehaviourofOpenHoldem).
ThisdeviatesfromstandardPPLagain.Howeverwehavethefollowingreasons:
OpenHoldemevaluatesitstechnicalfunctionsintheorderabove(fordetailspleaserefertotheOpenHoldemManual).webelieve,itisbettertobehaveinamoreconservativewayifanerroroccurs.Mostprobablyyoudon’twanttopushallinifyouspecifyRaiseHalfPotasyourdesiredaction.Withamin-raiseyouareprobablymorehappy(orlessunhappy).
DocumentgeneratedbyeLyXer1.2.5(2013-03-10)on2015-12-07T18:31:26.437000
HandlistsOpenHoldemsupportspreflophandliststosimplifypreflopcoding.Youcannamehandlistswhatyoulike,buthandlistnamesneedtostartwiththeword“list”.
##list007##
//Allin-rangeagainstcrazymaniacs
AAKKQQJJTT99//Pairs
AKsAQsAJsATsKQs//Suitedhands
AKoAQoAJo//Offsuitedhands
##list0fTr4sh1w4ntT0C4ll##
72o32o
Afterthatyoucanuseyourcustomhandlistsymbollikethis:
WHEN(Opponents=1ANDuserManiacFourBetsMeANDlist007RaiseMaxFORCE
Thereisnolimittothenumberoflistsyoucandefineandyoucanuseanynameyouwant.Indeeditisrecommendedthatyouchooseverbosenamesthatspeekforthemselves.
DocumentgeneratedbyeLyXer1.2.5(2013-03-10)on2014-12-12T08:54:20.061000
MathematicalExpressionsOfcourseOpenPPLsupportsarbitarycomplexmathematicalexpressions.Asanexampleletusconsideroddsandouts.
//Callingaccordingtooddsandouts
WHENAmountToCall/(AmountToCall+PotSize)>Outs/CardsLeftCallFORCE
Offcoursethisexampleisabitsimplistic.Itdoesnotconsiderotherplayersinthepot,impliedoddsonfuturestreets,thechancetosemi-bluff,etc.ButIthinkyougetthepoint.Thefollowingoperatorsaresupported:
EqualityOperators
Operator Meaning Example Exampleexplained= equal StillToAct=2 true,ifyouareonthebutton!= notequal Position!=First true,ifyouarenotoutof
position< smaller AmountToCall<5 true,iftherearelessthan5big
blindstocall> larger PotSize>20 true,ifthepotislargerthan20
bigblinds<= smalleror
equalAmountToCall<=5 true,iftherearelessthanor
equalto5bigblindstocall>= largeror
equalPotSize>=20 true,ifthepotcontains20or
morebigblinds
LogicalOperators
Thelogicaloperators“and”,“or”,and“not”shouldbeprettyself-explanatory.Operator ExampleNot WHEN(HaveNothingANDOpponentsLeft>=2ANDNOT
BotIsLastRaiser)CheckFORCEAnd WHEN(BotIsLastRaiserANDOpponentsLeft=1ANDBets=0
And...BetHalfPotFORCE)XOr Meaning:eitheror,whichistrue,ifexactlyoneoftheoperandsis
true,butnotbothOr WHEN(hand$AAORhand$KK)RaiseMaxFORCENegation(Not)hashighestpriorityofalloperators,thereafterfollowAnd,XOrandORindecreasingorder.Soifyouwanttowriteanexpressionlike
WHENAmountToCall<=4AND(hand$22ORhand$33...))
youhavetothrowinsomeextrabrackets,otherwisethebotwillcallwith33anybetandthatisprobablynotwhatyouwant.Morecomplicatedexpressionssometimesleadtoconfusion.Ifyouhaveaproblemwiththatyoumightwanttorevisitthebasicsofmathematicallogicandthe“LawsofDeMorgan”.
ArithmeticalOperators
OpenPPLalsosupportsbasicarithmetic.Theusualrulesapplyofcourse.Thepercentage-operatorhasthesameprioritylikemultiplicationanddivision,whichishigherthanaddition,subtraction.Operator Meaning Example+ addition- subtraction* multiplication/ division% Percentage-
operatorWHEN(AmountToCall<=50%PotSize)CallFORCE
Mod Modulus-operator
BitwiseOperators(forExperts)
FurthermoreOpenPPLsupportsbitwiseoperationsthatworkonallsinglebitsofbit-vectorsorbinarynumberssimultaneously.Theyareusefulforverylow-level-stufflikedetectingwhichchairsareseatedwithOpenHoldem’sbitwisesymbols(playersseatedbits,playersdealtbits,etc.).Mostplayerswon’teverneedthesesymbols,sowewillonlygiveyoualinktoagoodexplanationhere:http://en.wikipedia.org/wiki/Bitwise_operationOperatorBitAndBitCountBitNotBitOrBitXOr
User-DefinedVariablesMostprobablyyouneedsomegame-historytotakeyourdecision;thenyouwillfindsymbolslikeNoBettingOnFlopandOpenHoldem’shistorysymbolsandtheywillbeusefulforagoodportionosuse-cases,butidentifyingveryspecialsituationsafterwardsonlywiththebuilt-insymbolsmightbehardorevenimpossible.Sowouldn’titbehelpfulifyoucouldrememberwhathappenedinthegame?Ofcourseyoucan-withuser-definedvariables.Let’stakeasmallexample.User-definedvariablesneedtobeprefixedwiththeword“user”,andthewordSetwhenyougivethemavalue.
WHENFirstCallerPosition=9Setuser_UTG_Was_Limping
Asyousee,there’stheSetcommandandafteritthereisauser-definedvariableinsteadofanactionafteracondition,butnokeywordforce.WheneverOpenPPL/OpenHoldemseessuchaconstructitevaluatesthewhen-condition.Iftheconditionistrue,OpenHoldemsetstheuser-variabletotrueandcontinueswiththeevaluation,untilitfindsatrueconditionwithanaction.Alluser-definedvariablesstartwithfalse(0).Onceyousetthemtheybecometrue(or1,whichistechnicallythesame).User-definedvariableskeeptheirvalueforthecurrenthandandcan’tberesetbackbytheuser.Butwhenthehandisovertheygetresetautomatically.Naming:everyuser-definedvariablestartswiththeprefix“user”,followedbyasequenceofcharacters[a-zA-Z],digits[0-9]andunderscores[_].Queryingthevalueofavariableissimple:youcanuseitjustlikeanyothersymbolaspartofanexpression:
##f$preflop##
WHENHand$AARaiseMaxFORCE
WHENHand$KKSetuserDoesNotKnowWhatToDo
WHENHand$QQSetuserStartsToCry
WHENuserDoesNotKnowWhatToDoCallFORCE
WHENuserStartsToCrySitOutFORCE
WHENOthersFoldFORCE
ExpertTricks(MemorySymbols)
Doyouneedvariablesthatcanbesettoanyarbitraryvalue?Doyouneedvariablesthatcanberesetback?Doyouneedvariablesthatdon’tresetautomatically,butkeeptheirvaluestillthenexthandorevenforthecompletesession?Thereisasolutionforit(ofcourse).InsteadofPPL-likeuser-variablesitisalsopossibletouseOpenHoldem’smemory-store-command(followingexamplestorethedecimalnumber3,14..):
WHEN(...)Setme_st_MySecretVariable_3_141592653
andthenuseitlaterwithOpenHoldem’smemory-recall-command:
WHEN(...me_re_MySecretVariable...)...
Thisconstructisalittlebitmoremighty,butalsocontainssomepossiblepitfallsandrequiresextracarebytheuser.
OpenHoldem’suser-definedvariablesarecasesensitive.me_st_x_1issomethingdifferentthanme_st_X_1.Nounderscoresallowedinthenameofthevariable.Underscoresareusedtoseparatenameandvalue.(Ifyouwonder,whyunderscoresareallowedinsimpleuser-variables:becausethetranslatorremovesthem).Noautomaticreset.Ifyouneedsuchareset,youcoulddoite.g.beforeyourfirstactionpreflop:
##f$preflop##
WHEN(BotsActionsOnThisRound=0)
WHENOthersSetme_st_MySecretVariable_0
...
Tableocclusionresetthememoryvariables.
Maytheforcebewithyou!
DocumentgeneratedbyeLyXer1.2.5(2013-03-10)on2015-09-29T22:00:19.015000
BuildingSymbolsOnYourOwnThephilosophyof(standard)PPLis:providepoker-logicalsymbols,thatcanbeusedbyanypoker-playingperson,nomatterhowmuch(orless)programmingexperiencetheyhave.Examplesaree.g.MaxOpponentStackSize,StartingStackSizeHoweverthisapproachhassomedrawbacks:itshiftsallworktothedevelopersandlimitstheusers,whomightneedadditionalsymbolsfortheirbot-logic.Stayingwiththeexampleabove,theymightneed:SmallBlindStacksize,BigBlindStacksize,UTGStacksize,...,ButtonStacksize,OpenRaiserStacksize,LimpRaiserStacksize,ThreeBetterStacksize,FlopCheckRaiserStacksize,TurnDonkerStacksize,etc.Nomatterhowbusythedevelopmentteamis,theywillneverbeabletosatisfyallneeds.ThereforeOpenHoldem’s(andpartiallyOpenPPLs)philosophyisslightlydifferent:providetechnicalsymbolslikebalance0..balance9(thestacksizesforchair0..chair9)andlettheuserfigureouttherest.Thiswaytheend-userisfarmoreflexible;howeveratthecostofabitmorework.AsanexamplewedevelopasymbolBigBlindStackSize.Asafirststepweneedtoknowthechairofthebigblind.Thenasasecondstepwewillbeabletoreturnthestacksizeforthischair.TosolvethefirstproblemweusetheOpenHoldemsymbolac_dealposXwhichreturnsthedeal-positionofchairX.Thebigblindis(withtheveryrareexceptionofamissingsmallblind)alwaysthesecondplayertobedealt,sowesearchforathechair,thatgotdealtassecondplayer.
##f$BigBlindChair##
WHENac_dealpos0=2RETURN0FORCE
WHENac_dealpos1=2RETURN1FORCE
WHENac_dealpos2=2RETURN2FORCE
WHENac_dealpos3=2RETURN3FORCE
WHENac_dealpos4=2RETURN4FORCE
WHENac_dealpos5=2RETURN5FORCE
WHENac_dealpos6=2RETURN6FORCE
WHENac_dealpos7=2RETURN7FORCE
WHENac_dealpos8=2RETURN8FORCE
WHENac_dealpos9=2RETURN9FORCE
//Othercasesshouldnothappen
WHENOthersRETURN-1FORCE
Havingthisinformationwecancontinuewiththesecondstep(thedullpart).Wereturnthestacksizeforthechairofthebigblind,makinguseofOpenHoldem’sstacksizesymbolsbalance0..balance9.AsyoucanseeitispossibletouseOpenHoldemSymbolsinyourOpenPPLcode.Ofcourse-wenearlyforgottomentionit.
##f$BigBlindStacksize##
WHEN(f$BigBlindChair=0)RETURNbalance0FORCE
WHEN(f$BigBlindChair=1)RETURNbalance1FORCE
WHEN(f$BigBlindChair=2)RETURNbalance2FORCE
WHEN(f$BigBlindChair=3)RETURNbalance3FORCE
WHEN(f$BigBlindChair=4)RETURNbalance4FORCE
WHEN(f$BigBlindChair=5)RETURNbalance5FORCE
WHEN(f$BigBlindChair=6)RETURNbalance6FORCE
WHEN(f$BigBlindChair=7)RETURNbalance7FORCE
WHEN(f$BigBlindChair=8)RETURNbalance8FORCE
WHEN(f$BigBlindChair=9)RETURNbalance9FORCE
//Othercasesshouldnothappen.
//Butifyouforgetabout"WHENOthers"
//therealwaysisanimplicit"RETURN0FORCE".
WHENOthersRETURN0FORCE
Yousee:itisnotthatdifficulttoextendOpenPPLonyourown.Thepossibilitesarenearlyendless.Forthemomentweskippedsomedetails,butcreatingnewsymbolsisself-explaining:eachnewsymbolstartswithafunctionheader,thatdefinesitsname.Thenameofuser-definedsymbolstraditionallybegineswithf$.Forexample##f$BigBlindStacksize##.Thereafterfollowsthefunction’scode,whichusuallyisinasequenceof(optionallyopen-ended)when-conditions.Thesewhen-conditionsusuallydefineactions(inthecaseoff$preflop...f$river)ortheycontainreturn-statementslikeintheexampleabove.That’sall.OpenPPLiseasy.
AdvantagesofSymbols
Inourearlyversionsofthemanualwedidn’ttalkabouttheadvantagesofstructuredcode(especiallyfunctionsAKAsymbols),becausetheyweretooobviousforus.Thiscausedsomeconfusionsfornewbies.Symbolsaregreat:
togetunderstandableandself-documentingcode(goodnaming;http://en.wikipedia.org/wiki/Information_hiding)togetreusabelcode(namedcode-snippets)togetsmallcode(nocodeclones)togetmaintainablecode(changeandfixonelocationonly)togetfastcode(becauseofOpenHoldem’ssymbol-caching:evaluatesonlyonce,usethevalueoften)togetreadablelog-files(becauseyouseeallthesymbol-namesandtheirvalues)...
Sohowoftenshouldyoumakeuseofsymbols?Allday.Everywhere.Asmuchaspossible.Enjoythem!
OpenPPLSymbolsBelowyoufindalistofOpenPPLsymbols.TheyarepartoftheOpenPPLfunction-library,whichgetsloadedautomaticallywhenyouloadOpenHoldem.MostofthesesymbolsworkexactlythesamewayastheirPPLcounterparts.Onlyveryfewdiffer,mostlyfortechnicalreasons,butsomeofthembecausewethinkitisbetterthatway.Thesedifferencesaredocumentedofcourse.Youwillalsofindsomenewsymbols,thatarenotpartofstandardPPL;somePokerTrackerandstacksizesymbolsforexample.However:wedidn’timplementeverythingthatispossibleanddesireable.Moreextensionsaresubjectofthenextchapter:“BuildingSymbolsOnYourOwn”.Whoknows:ifyoucomeupwithsomegoodcode,reasonablenamingandagooddescriptionyournewsymbolsmightbecomepartofafutureOpenPPL-release.PleasenotethatalloPPLsymbolsarecasesensitive
DocumentgeneratedbyeLyXer1.2.5(2013-03-10)on2014-09-23T13:50:40.366000
BettingActionSymbolsName MeaningAllOpponentsLeftSittingOut True,ifallremainingopponentsare
sittingout.Thissymbolisespeciallymeantforuseintournaments
Bets Thenumberofbetsmadebyopponentsthisbettinground,canonlybe0or1sincethe2ndbetisaraise
BigBlindSittingOut True,ifthebigblindissittingout.Thissymbolisespeciallymeantforuseintournaments
BotCalledBeforeFlop TrueifwecalledpreflopBotCalledOnFlop TrueifwecalledontheflopBotCalledOnTurn TrueifwecalledontheturnBotCalledOnRiver TrueifwecalledontheriverBotIsLastRaiser Trueifwehavethebetting/raising
initiative,i.ewewerethelastraiseronthepreviousround
BotRaisedBeforeFlop Trueifweraisedpreflop,canalsobeusedpreflop
BotRaisedOnFlop Trueifwebetorraisedontheflop,canalsobeusedontheflop
BotRaisedOnTurn Trueifwebetorraisedontheturn,canalsobeusedontheturn
BotsActionsOnFlop NumberofactionswhereweputmoneyinthepotontheFlop
BotsActionsOnThisRound Numberofactionsthisbettingroundwhereweputmoneyinthepot
BotsActionsOnThisRoundIncludingChecks Numberofchecks+numberofactionswhereweputmoneyinthe
potBotsActionsPreflop Numberofactionswhereweput
moneyinthepotpreflop,all-insarenotcountedasthegamewouldthenbeover
BotCheckedPreflop TrueifbotcheckedpreflopBotCheckedOnFlop TrueifbotcheckedontheflopBotCheckedOnTurn TrueifbotcheckedontheturnBotCheckedOnRiver TrueifbotcheckedontheriverBotsLastAction Bot’slastaction,canbeoneofthe
following:None,Beep,Raise,Bet,Call,orCheck
BotsLastPreflopAction Bot’slastpreflopaction,canbeoneofthefollowing:None,Beep,Raise,Bet,Call,orCheck
BotsLastFlopAction Bot’slastflopaction,canbeoneofthefollowing:None,Beep,Raise,Bet,Call,orCheck
BotsLastTurnAction Bot’slastturnaction,canbeoneofthefollowing:None,Beep,Raise,Bet,Call,orCheck
Calls Thenumberofcallsbyopponentsonthisbettinground
CallsSinceLastRaise Thenumberofcallsbyallopponentssincethelastraisebyanopponentonthecurrentbettinground
Checks Thenumberofchecksmadebyopponentsthisbettinground
Folds Thenumberoffoldsthisbettinground
MissingSmallBlind True,ifthereisnosmallblindinthishand,e.g.theplayerwhowouldhavebeenSBdidbustintheprevioushand.
NoBettingOnFlop Trueifnobets/raisesweremadeon
theFlop,mayalsobeusedontheFlop.Betsbyheroarealsocounted
NoBettingOnTurn Trueifnobets/raisesweremadeontheTurn,mayalsobeusedontheTurn,p.Betsbyheroarealsocounted
NoVillainBetOrRaisedOnFlop NovillanbetorraisedonFlop.Betsbyheroarenotcounted
NoVillainBetOrRaisedOnTurn NovillanbetorraisedonTurn.p.Betsbyheroarenotcounted
NumberOfOpponentsAllin Numberofopponentswhoraisedorcalledallin.Range:0..9.IftheamounttocallisequaltoourstacksizeandweareheadsUpweconsiderthevillanasbeingallin.
NumberOfRaisesBeforeFlop ThenumberofraisesbeforetheFlopmadebyopponents
NumberOfRaisesOnFlop ThenumberofraisesontheFlopmadebyopponents.Betsdon’tcount
NumberOfRaisesOnTurn ThenumberofraisesontheTurnmadebyopponents.Betsdon’tcount.
OpponentCalledOnFlop AnopponentcalledonFlop,anddidnotraiseorbet
OpponentCalledOnTurn AnopponentcalledonTurn,anddidnotraiseorbet
OpponentIsAllin Anopponentisallin,theremaystillbeotherplayersinthehand.IftheamounttocallisequaltoourstacksizeandweareheadsUpweconsiderthevillanasbeingallin.
Raises Thenumberofraisesmadebyopponentsthisbettinground.Betsdon’tcount.
RaisesBeforeFlop Trueifanyopponentraisedbefore
theflopRaisesOnFlop Trueifanyopponentraisedonthe
flop.Betsdon’tcount.RaisesOnTurn Trueifanyopponentraisedonthe
turn.Betsdon’tcount.RaisesSinceLastPlay Thenumberofraisessinceourlast
action.Betsdon’tcountSmallBlindSittingOut True,ifthebigsmallissittingout.
Thissymbolisespeciallymeantforuseintournaments
Pleasenote:OpenPPLhistorycounterslikeRaisesandCallsneedtogetupdatedexactlyonceperorbitwhenweseestableinput(i.e.outturn).Thisupdategetsexecutedafterautoplayer-actions.Thereforethesecountersneedanactiveautoplayertoworkproperlyformultipleorbits.
BetsizesAndStacksizesStandardPPLisabitrestrictive:betsizes,stacksizesandpotsizesmayappearonlyontheleftorontherightsideofcomparisonoperators---pleasedon’taskusabouttheexactrules,weforgotthem.InOpenPPLyoucanputthemanywhereyoulike.
WHEN(AmountToCall<Pi*R*R)DANCEFORCE
It’suptoyou,whatandhowyoucode.Name Meaning LimitationsAmountToCall Theamounttocall,
countedinbigblindsNone
BetSize Thenumberofbigblindsbetbythelastaggressor
None
BigBlindSize Thesizeofthebigblind,usuallyindollars
None
MaxStacksizeOfActiveOpponents Thebiggeststacksize(expressedinbblindandnotdollars)ofallopponentscurrentlyplayingthehand.
Couldbebiggerthanyourbalance.UseEffectiveMaxStacksizeOfActiveOpponentstoknowexactlythebalanceatrisk.
EffectiveMaxStacksizeOfActiveOpponents Thebiggesteffectivestacksize(expressedinbblindandnotdollars)ofallopponentscurrentlyplayingthehand.
Yousomeopponentshavemorechips/moneythanyouthesymbolwillreturntheamoutofyourbalancetoreflecthowmuchbotisriskinginaspecifiedhand.
MaxOpponentStackSize Thebiggeststackofallopponents(playingandnotplaying).measuredinbigblindsatthebeginningofthehand
NoneDependsongame-history(game-stateonyourfirstaction)
MaxStillToActStackSize Thenumberofbigblindsinthestackoftheopponentwiththelargeststackwhohasnotacted
Firstactionprefloponly
yetMinOpponentStackSize Thesmalleststackofall
opponents.(playingandnotplaying)measuredinbigblindsatthebeginningofthehand
NoneDependsongame-history(game-stateonyourfirstaction)
MinStillToActStackSize Thebiggeststackoftheopponentsbehindyou(includingSBandBB),measuredinbigblinds
Firstactionprefloponly
OpponentStacksizeHeadsUp Stacksizeofopponentwhenheadsup.PleasereadLimitations
OpponentStacksizeHeadsUpreturn-1whennotvalid.Whenusingthissymbolyouhavetocheckiftheresultis>-1andthenmakeyourcomparison.
PotSize Thecurrentpot,includingallplayersbets,countedinbigblinds.PotSizereturnseffectivepotsizeyouareparticipatingin.
None
StackSize Ourcurrentbalance,countedinbigblinds
None
StackSizeAtBeginningOfCurrentRound OurStackSizeatthebeginningofcurrentbettinground(StackSize+TotalInvestedThisRound)
Validoneverybettinground
StackUnknown Returnstrueiftheuserchairisunknown,falseotherwise.IntroducedforcompatibilitywithShanky-PPL
StartingChips Ourbalanceatthestartofasession,countedin“dollars”Thissymbolisespeciallymeantfor
None.
MTTs.StartingStackSize Ourbalanceatthestart
ofasession,countedinbigblinds
NoneDependsongame-history(game-stateonyourfirstaction)
TotalInvested Themoneyputintothepotinthishand,countedinbigblinds
None
TotalInvestedThisRound AmountInvestedincurrentbettinground
None
BoardSymbolsIfasetisonboard,“PairOnBoard”isalsotrue;fullhousesdoalsocountassetsandpairs,madeflushesasflushdraws,etc.Oneofmanyreasonswhyyoushouldcodestronghandsfirst.Name MeaningSecondTopFlopCardPairedOnRiver Synonymfor
SecondTopFlopCardPairedOnRiverSecondTopFlopCardPairedOnTurn Synonymfor
SecondTopFlopCardPairedOnTurnAcePresentOnFlop AnaceispresentonFlopFlushOnBoard TheentireboardarethesamesuitFlushPossible Aflushispossibleonthecurrentboard
(3ormoreof1suit)FlushPossibleOnFlop TheentireFlopisonesuitFlushPossibleOnTurn AflushispossibleontheTurnFourCardsToWheelOnBoard Trueifawheelcanbemadebyusing
onlyoneholecard,i.e.if4cardsofA2345areontheboard
FourOfOneSuitOnTurn Trueifonly1suitis/waspresentontheboardontheTurn
FullHouseOnBoard ThereisafullhouseontheboardHighCardOfCommonStraigh Returnsthevalueofthehighestcardofa
sharedstraight.Especiallymeanttodecideifwehavethesharednuts(Ace)orifwecanbeattheboard
KingPresentOnFlop True,ifatleastoneoftheFlop-cardsisaking
LowCardsOnBoard Thenumberofcardswiththerankof8orlower(aceiscountedaslow).Duplicatesofonerankarenotcounted
MoreThanOneStraightPossibleOnFlop MorethanonestraightispossibleontheFlop
MoreThanOneStraightPossibleOnTurn Thereis/wasmorethanonewaytomakeastraightontheTurn
NutsOnBoard Trueifthebestpossiblehandisontheonboard
OneCardFlushPossible Theboardcontains4or5cardsofthesamecolour
OneCardStraightFlushPossible Onlyoneholecardisneededtomakeastraightflush
OneCardStraightPossible Onlyoneholecardisneededtomakeastraight
OneCardStraightPossibleOnTurn Aonecardstraightis/waspossibleontheTurn
Only1OneCardStraightPossible onlyonestraightcanbemadeusingonlyoneholecardwiththecurrentboardcards
OnlyOneStraightPossible OnlyonestraightpossibleOvercardsOnBoard Thenumberofcommoncardsthatare
higherthanthehighestcardinourhandPairOnBoard Thereareatleast2cardsofthesame
rankontheboardPairOnFlop ApairispresentontheFlopPairOnTurn TheboardhasapairontheTurnoron
theFlop)QuadsOnBoard TherearequadsontheboardQueenPresentOnFlop AqueenispresentontheFlopRiverCardIsOvercardToBoard TheRivercardisthehighestranked
commoncardRunnerRunnerFlushPossibleAtRiver TrueifaRunnerRunnerFlushis
possibleattheRiverSecondTopFlopCardPairedOnRiver True,ifthe2ndhighestFlopcardpaired
ontheRiver.IftheFlopispaireditwillbethelowestcard.IfallranksareequalquadsattheRiverwillmakethisfunctiontrue.
SecondTopFlopCardPairedOnTurn True,ifthe2ndhighestFlopcardpairedontheTurn.IftheFlopispaireditwill
bethelowestcard.IfallranksareequalquadsattheTurnwillmakethisfunctiontrue.
StraightFlushOnBoard StraightflushisonboardStraightFlushPossible StraightflushispossibleStraightFlushPossibleByOthers Astraightflushcanbemadebyan
opponentwithregardstoourcardsStraightOnBoard TheboardcontainsastraightStraightPossible StraightispossibleStraightPossibleOnFlop AstrightispossibleontheFlopStraightPossibleOnTurn AstrightispossibleontheTurnSuitsOnBoard Thenumberofdifferentsuitsonboard.
Always0Preflop.SuitsOnFlop Thenumberofdifferentsuitsonthe
Flop.Always0Preflop.SuitsOnRiver Thenumberofdifferentsuitsonthe
River.Always0Preflop,attheFlopandtheTurn.
SuitsOnTurn ThenumberofdifferentsuitsontheTurn.Always0PreflopandattheFlop.
ThreeCardStraightOnBoard Thereareatleastthreeconnectedcardsontheboard
TopFlopCardPairedOnRiver ThecardwiththehighestrankontheFloppairedontheRiver
TopFlopCardPairedOnTurn ThecardwiththehighestrankontheFloppairedontheTurn
TripsOnBoard Atleastthreecardsofthesamerankarepresentontheboard
TripsOnBoardOnTurn AtleastthreecardsofthesamerankispresentontheTurn
TurnCardIsOvercardToBoard TheTurncardisthehighestrankedcommoncard
TurnCardPaired ThecardthatwasdealtontheTurnpairedontheRiver
TwoOfOneSuitPresentOnFlop True,iftheFlophas/hadatleast2
cardsofthesamesuit.TwoPairOnBoard True,iftheboardcontainstwopairsTwoPairOnBoardOnTurn True,iftheboardcontainedtwopairson
TurnUncoordinatedFlop True,iftheFlopcontains/containedno
paironboard,nopossibleflush,threedifferentsuits,nopossiblestraightandnoopponentcouldhave7ormoreoutstoastraight
WheelPossible True,ifastraightwithA2345ispossible
HandStrengthSymbolsIfasetisonboard,“PairOnBoard”isalsotrue;fullhousesdoalsocountassetsandpairs,madeflushesasflushdraws,etc.Thereforeitisastronglyrecommendedtocodemadehandsfirst(andstrongmadehandsattheverybeginning),thenweakerholdingwithpositivepotentialandweakerdrawsattheverylast.Name MeaningHadOverpairOnFlop Ourpocketpairis/wasofhigherrankthan
thehighestrankedflopcardHadOverPairOnTurn Ourpocketpairis/wasofhigherrankthan
thehighestrankedturncardHadPairOnFlop WehadapairontheflopHadPairOnTurn WehadapairontheturnHadSetOnFlop WehadaSetonflopHadSetOnTurn WehadaSetonturnHadTopPairOnFlop Have/hadtoppaironflopHadTopPairOnTurn Have/hadtoppaironturnHadTwoPairOnFlop WehadtwopairontheflopHadSecondOverPairOnFlop Wehad2ndoverpaironflopHadSecondOverPairOnTurn Wehad2ndoverpaironflopHadSecondTopPairOnFlop Wehad2ndtoppaironflopHaveSecondBestKicker Thereisonlyonecardthatisbetterthan
ourcurrentkickerHaveSecondBestKickerOrBetter WehavethebestorsecondbestkickerHaveSecondBestOverPairOrBetter Wehavethesecondbestoverpair(KK)or
astrongerhandHaveSecondNutFlush WehavethesecondbestflushpossibleHaveSecondNutFlushDraw WehavethesecondbestflushdrawHaveSecondNutStraight WehavethesecondbeststraightpossibleHaveSecondOverPair Wehaveaholepairwhichisbetweenthe
highestboardcardandthe2ndhighestcardrankonboard
HaveSecondTopPair WehavethesecondhighestpairHaveSecondTopSet WehavethesecondbestsetHaveThirdBestKicker WehavethethirdbestkickerHaveThirdBestKickerOrBetter WehavethethirdbestkickerorbetterHaveThirdBestOverPairOrBetter Wehavethethirdbestoverpair(QQ)ora
betterhandHaveThirdNutFlush WehavetheThirdbestflushHaveThirdNutFlushDraw WehavetheThirdbestflushdrawHaveThirdOverPair Wehaveaholepairwhichisbetweenthe
2ndhighestboardcardandthe3rdhighestcardrankonboard
HaveThirdTopPair wehavetheThirdhighestpairHaveThirdTopSet WehavetheThirdhighestsetHaveFourthNutFlush WehavetheFourthhighestflushHaveFourthNutFlushDraw WehavetheFourthhighestflushdrawHaveFourthOverPair Wehaveaholepairwhichisbetweenthe
3rdhighestboardcardandthe4tfhighestcardrankonboard
HaveFourthTopPair WehavetheFourthhighestpairHaveFourthTopSet WeHavetheFourthhighestsetHaveFifthNutFlush WehavetheFifthhighestflushHaveFifthNutFlushDraw WehavetheFifthhighestflushdrawHaveFifthOverPair Wehaveaholepairwhichisbetweenthe
4thhighestboardcardandthe5thhighestcardrankonboard
HaveFifthTopPair WehavetheFifthpairHaveBackdoorSecondNutFlushDrawWehavethe2ndhighestbackdoornut
flushdrawHaveBackdoorThirdNutFlushDraw WehavetheThirdhighestbackdoornut
flushdrawHaveBackdoorFlushDraw Wehaveaflush,flushdraworabackdoor
flushdraw.HaveBackdoorFlushdrawisonlytrue,if
wecontribute2cards
orwecontribute1cardtothenutsorwecontribute1cardtothe2ndnuts
HaveBackdoorNutFlushDraw WehaveabackdoornutflushdrawHaveBackdoorStraightDraw True,ifweneed2cardstocompletea
straightHaveBestKicker WehavethebestkickerHaveBestKickerOrBetter WehavethebestkickeBestOvrorabetter
handHaveBestOverPairOrBetter Havethebestoverpair(AA)orabetter
handHaveBottomPair Wehaveaholecardthatispairedwiththe
lowestcardonboardHaveBottomSet WehaveasetwiththelowestboardcardHaveBottomTrips WehaveatripswiththelowestboardcardHaveBottomTwoPair WehavebottomtwopairHaveDoubleGutshotDraw WehaveadoublegutshotdrawHaveFlush WehaveaflushHaveFlushDraw WehaveaflushdrawHaveFullHouse WehaveafullhouseHaveInsideNutStraightDraw Trueifthebothasaninsidenutstraight
draw.Aninsidenutstraightdrawisdefinedasahandwithatleast4‘outs’toanutstraight.UnlikeNutStraightDraw,outsthatmakeaflushpossiblearenotexcluded
HaveInsideStraightDraw WehaveaninsidestraightdrawHaveNothing Wehavenothing(nopair,overcards,
flushdraworstraightdraw)HaveNutFlush WehavethenutflushHaveNutFlushCard WehavethenutflushcardHaveNutFlushDraw WehavethenutflushdrawHaveNuts Wehavethebesthandpossibleatthis
time
HaveNutStraight WehavethebestpossiblestraightHaveNutStraightDraw True,ifwehaveadrawtothebest
straight;thismeans:ifwehit,nobetterstraightispossible.E.g.87ataboardof653.Anutstraightdrawrequires“atleast7outs”accordingtoShankysdefinition.Thereforestraightdrawsgetdiscountedifthereisaflushdrawpossible.UseHaveUnDiscountedNutStraightDrawifyoudon’tworryaboutpossibleflushes.
HaveNutStraightFlush WehavethenutstraightflushHaveOpenEndedStraightDraw WehaveanopenendedstraightdrawHaveOverPair Wehaveapocketpairhigherthananycard
ontheboardHavePair Wehaveapair,apairedboarddoesen’t
countHavePocketPair Wehaveapocket-pairlikeAAor55HaveQuads WehavequadsHaveRunnerRunnerFlushAtRiver WehaveFlushandwemadeitwithTurn
andRivercardHaveSet Wehaveaset,i.e.threeofakindwitha
pairinthehandHaveStraight WehaveastraightHaveStraightDraw WehaveastraightdrawHaveStraightFlush WehaveastraightflushHaveTopNonBoardPairedPair Oneofourholecardsisthesamevalueas
thehighestnon-pairedcardonboardHaveTopPair Oneofourholecardsispairedwiththe
highestrankedcardontheboardHaveTopSet True,ifwehaveasetwiththehighest
boardcardHaveTopTwoPair Thetwohighestcardsontheboardare
pairedwithourholecardsHaveTopTrips TrueifwehavethebestpossibletripsHaveTrips Wehavetrips,i.e.threeofakindwitha
pairontheboardHaveTwoPair Wehavetwopair,paironboarddoesnot
countHaveUnderPair Wehaveapocketpairlowerthanthe
lowestrankedcardonboardHaveUnderStraight WehavethelowerpartofastraightHaveWeakBackdoorStraightDraw Thesesymbolsdescribehandsthatareso
weakthatwedon’tconsiderthemasregularholdings,e.g.thesingle-cardidiot-endofastraightorasharedflush-drawattheboard.
HaveWeakDoubleGutshotDrawHaveWeakFlushHaveWeakFlushDrawHaveWeakInsideStraightDrawHaveWeakStraightHaveWeakStraightDrawKingPresentOnFlop AkingispresentontheflopNutFullHouseOrFourOfAKind Thissymbolevaluatesthestrengthof
quadsandfullhouses.Topquadsarealwaysratedas1,bottomquadsorbest-fullhouseas2,nextbesthandas3andsoon.Thissymboldoesnottakestraightflushesintoaccount.Soitcouldreturn1evenifourhandcanbebeatenbyastraightflush.StandardPPLreturns0ifwedon’thaveanyquads/FHatall.Howeverwethinkthisiscounterintuitiveandcausesproblems,asasmallernumbermeansabetterhand.OpenPPLreturns999forthatcase.
Overcards Thenumberofholecardsthatareovercardstotheboard
PairInHand True,ifwehaveapocketpairSuitsInHand Thenumberifuniquesuitsinourhand
TopPairRank RankoftheholecardgivingyouTopPair(2-14where14isAce)
SecondTopPairRank RankofoursecondTopPairThirdTopPairRank RankofourthirdTopPairForthTopPairRank RankofourforthTopPairFifthTopPairRank RankofourfifthTopPairTopPairKickerRank Rankoftheholekickercardwhenyou
haveTopPair(2-14where14isAce)TripsRank RankofourTripsTripsKickerRank RankofthekickerofourTrips
OtherSymbols
Name Meaning LimitationsIsFinalTable Weareatthefinaltableof
atournamentWorksonlywithOpenHoldem2.2.0.+andatcasinoswherethefinaltableandnormaltablescanbevisuallydistinguised.Seethetablemap-symbols$isfinaltable.
Others Alwaystrue-mainlyusedfor
WhenOthersFoldForce
None
Random Returnsarandomnumberintherange[0..100]
Getsevaluatedneweachtimeitgetsused.Sobecarefulifyoucodesequencesofrandomactions.IfyouneedarandomfunctionthatstaysconstantforsometimeyoucouldusetheOpenHoldemsymbols
randomheartbeatrandomroundrandomround1..randomround4randomhand
Butbecareful:OpenHoldemsrandomsymbolsareintherange[0..1]
Player-andOpponentSymbolsName Meaning LimitationsHandIsHeadsup Trueiftwopeople
competeforthispot.thehandmighthavebeenmore-handedbefore.
None
LastAggressorActsAfterUs True(returns1)ifthelastaggressoractsafterus
None
Opponents Thenumberofopponentsthatarecurrentlyinthehand.Doesalsocountplayersthatareallin(contrarytoShankywhocountplayersthatwentallininthisbettinground,butnotplayersallinfrompreviousrounds).
REMARK.ToknowthenumberofOpponentswithbalanceabovezeroyoushouldusetheformula“Opponents-NumberOfOpponentsAllin”
OpponentsAtTable Thenumberofopponentsthatweredealtcardsthishand
None
OpponentsLeft SamemeaningasOpponentsbutbetternaming.
None
OpponentsOnFlop ThenumberofopponentsthatsawtheFlop
None
OpponentsWithHigherStack Thenumberofopponentsthatareseatedandhavehigherbalancethanyourself
None
OpponentsWithLowerStack Thenumberofopponentsthatareseatedandhavelessbalancethanyourself
None
TableIsHeadsup Trueifonlytwopeoplehavebeendealt(cash-game)andonlytwopeopleareseated(tournaments,whereplayerswhositoutalsogetdealt).Thissymbolisespeciallymeanttodetectthelateststageofatournament,contrarytoHandIsHeadsupforcash-games.
None
PokerTrackersymbols(Version3)Assumingalltheprerequisitesasdescribedintheconfigurationmanualaremet,thefollowingnativeOpenHoldemsymbolswillbeavailabletoyourbotforuseinitslogicprocessing.Theappropriateuseofthesesymbolsinopponentmodelingisbeyondthescopeofthisdocument,butplentyofreferencescanbefoundontheInternetwithaGooglesearch.Allthesymbolsbelowareavailablebothforcashgamesandfortournaments(SNG,MTT).OpenHoldemwillautomaticallyadaptthedatabase-queriesforyourgame-typeandprovidetherightstats.Allstatscanbeaccessedin3differentways:
forthechairoftheaggressor,e.g.pt_icon_raischair.ThissituationisoneofthemostcommonneedsforPokerTrackerstats.forasingleopponentheadsup,e.g.pt_icon_headsuptoidentifycertainplayersbytheirpreflop-positionusethepostfixessmallblind,bigblind,dealer,cutoff,user.besidesofthatyoucanusefirstcaller,lastcallerandfirstraiser.Theyworkforthecurrentorbitonly.bychairnumber,e.gpt_icon0..pt_icon9:thisismorecomplexandlessconvenientthanbothmethodsabove,butyougettheabilitytobuildanyadvancedstatonyourownaslongasyouareabletoidentifythechairofyourvillain.
Summary:Youneedtousetheprefix“pt_”.Thenaddthesymbolname.Finallyaddoneofthosepostfix:
_raischair_headsup_smallblind_bigblind_dealer_cutoff_firstcaller_lastcaller_firstraiser_dealer_user
thechairnumberbetween0and9
Generalstats
SymbolMeaningiconPokerTrackerauto-rateiconcodehandsPokerTrackernumberofhandsthatareinthedatabasevpipPokerTrackerVP$IPpfrPokerTrackerpre-flopraisewtsdPokerTrackerwenttoshowdownwssdPokerTrackerwon$atshowdownaggr_factorPokerTrackertotalaggressionaggr_factor_without_preflopPokerTrackertotalaggressionexcludingpreflopfold_to_3betPokerTrackerfoldedwhilefacing3bettotal4betPokerTrackerOverall4B
Preflopstats
SymbolMeaningpreflop_aggr_factorPokerTrackerpreflopaggressionfactorpreflop_rfiPokerTrackerpre-flopraisefirstinpreflop_3betPokerTracker3betprefloppreflop_fold_to_3betPokerTrackerfoldedwhilefacing3betpreflop
preflop_called_raisePokerTrackerpre-flopcalledraisepreflop_attempt_stealPokerTrackerattempttostealblindsbigblind_fold_to_stealPokerTrackerfoldedbigblindtostealsmallblind_fold_to_stealPokerTrackerfoldedsmallblindtostealpreflop_3bet_vs_stealPokerTracker3betvs.stealbigblind_3bet_vs_stealPokerTrackerBB3betvs.stealsmallblind_3bet_vs_stealPokerTrackerSB3betvs.stealpreflop_4betPokerTrackerPreflop4Bpreflop_fold_to_4betPokerTrackerPreflopfoldto4B
Flopstats
SymbolMeaningflop_seenPokerTrackersawflopflop_aggr_factorPokerTrackerflopaggressionfactorflop_cbetPokerTrackerflopcbetflop_fold_to_cbetPokerTrackerfoldedwhilefacingcbetflopflop_raise_cbetPokerTrackerraiseflopcbetflop_fold_to_3betPokerTrackerfoldedwhilefacing3betflopflop_checkraisePokerTrackerflopcheck-raiseflop_donkbetPokerTrackerdonkbetflop
Turnstats
SymbolMeaningturn_seenPokerTrackersawturnturn_aggr_factorPokerTrackerturnaggressionfactorturn_cbetPokerTrackerturncbetturn_fold_to_cbetPokerTrackerfoldedwhilefacingcbetturnturn_fold_to_3betPokerTrackerfoldedwhilefacing3betturnturn_checkraisePokerTrackerturnCheck-Raiseturn_checkcallPokerTrackerturnCheck-Call
Riverstats
SymbolMeaningriver_seenPokerTrackersawriverriver_aggr_factorPokerTrackerriveraggressionfactorriver_fold_to_3betPokerTrackerfoldedwhilefacing3betriverriver_fold_to_cbetPokerTrackerfoldedwhilefacingcbetriverriver_betPokerTrackerriverbet
PositionSymbolsGoodnews:contrarytoStandard-PPLmostpositionsymbolsarenotrestrictedtofirstorbitprefloponly.Youcanusetheminlaterorbitstooandalsopostflop.PositionsarealwaysBU—CO—MP3—MP2—MP1—EP3—EP2---EP1—BB—SB.Iftherearelessthan10playersatthetable,thensomeoftheearlypositionswillbemissing(EP1—EP2,etc.).Symbolslike“InButton”canbespelledintwodifferentways:“InButton”orjust“Button”.
Name Meaning LimitationsFirstCallerPosition Thepositionofthefirstcaller
(bigblind=0(althoughthiscannothappen),smallblind=1,thencounter-clockwisetill
Firstorbitprefloponly
UTG=9)FirstRaiserPosition Thepositionofthefirstraiser
(bigblind=0,smallblind=1,thencounter-clockwisetillUTG=9)
Firstorbitprefloponly
InBigBlind True,ifyouarebigblind.OpenPPLissmartenpughtodetectamissingsmallblind(e.g.hebustedinatournament).Inthiscasetheplayertotheleftofthedealerwillbebigblind.
None
InButton Trueifyouarebutton(lasttoactpostflop)
None
InCutOff True,ifyouareCutOff(righttothebutton;thispositionexistsonly,ifthegameisatleast4-handed,otherwisethesymbolwillalwaysbefalse)
None
InEarlyPosition True,ifyouareinoneoftheearlypositions
None
InEarlyPosition1 True,ifyouareinEP1(lefttothebigblind,righttoEP2;thispositionexistsonly,ifthegameisatleast10-handed,otherwisethesymbolwillalwaysbefalse)
None
InEarlyPosition2 True,ifyouareinEP2(thispositionexistsonly,ifthegameisatleast9-handed,otherwisethesymbolwillalwaysbefalse)
None
InEarlyPosition3 True,ifyouareinEP3(thispositionexistsonly,ifthegameisatleast8-handed,otherwisethesymbolwillalwaysbefalse)
None
InLatePosition True,ifyouareeitherCutOfforButton
None
InMiddlePosition True,ifyouareinoneofthemiddlepositions
None
InMiddlePosition1 True,ifyouareinMP1(thispositionexistsonly,ifthegameisatleast7-handed,otherwisethesymbolwillalwaysbefalse)
None
InMiddlePosition2 True,ifyouareinMP2(thispositionexistsonly,ifthegameisatleast6-handed,otherwisethesymbolwillalwaysbefalse)
None
InMiddlePosition3 True,ifyouareinMP3(thispositionexistsonly,ifthegameisatleast5-handed,otherwisethesymbolwillalwaysbefalse)
None
InSmallBlind True,ifyouaresmallblind NoneInTheBlinds True,ifyouareeithersmall
blindorbigblindNone
InUTG True,ifyouareunderthegun(lefttothebigblind),independentofthenumberofplayersatthetable.Thissymbolsisescpeciallyusefultositoutafterthelasthandofasession(beforethenextblind),butshouldnotbeusedforpositionalplay.BetterusesymbolslikeInEarlyPosition1forselectionofyourstartinghands.
None
LastCallerPosition Thepositionofthelastcaller(bigblind=0,smallblind=1,
Firstorbitprefloponly
thencounter-clockwisetillUTG=9)
LastRaiserPosition Thepositionofthelastraiser(bigblind=0,smallblind=1,thencounter-clockwisetillUTG=9)
Firstorbitprefloponly
Position Ourpositionrelativetotheotherplayer,meantespeciallyforpostflopplay.Thereare3positionsatthetable:
Position=First
Position=Middle
Position=Last
Middleiseverything,thatisneitherfirstnorlast.
None
StillToAct Thenumberofopponentsthathavenotyetactedinthehandwhenitisyourturn,i.e.theplayersbehind,includingtheblinds.TheShanky-waytodetermineyourpreflop-position,buttherearebettersymbols,e.g.InButton,etc.,whichcanalsobeusedinlaterorbitsandinanybetting-round.
Firstorbitonly,bothPreflopandpostFlop
DocumentgeneratedbyeLyXer1.2.5(2013-03-10)on2015-12-01T12:34:24.625000
TechnicalSymbolsWhilebuildingtheOpenPPLlibrarythedevelopershadtocreatelotsofinternalsupportingfunctions.Mostofthemaresotechnicalthattheyareofnousefortheend-user.HoweversomeofthemmightbehelpfulforpeoplewhowanttoextenttheOpenPPLlibrarywiththeirownsymbols.AfunctionlikeSmallBlindChairmightforexamplebeusefulforthedevelopmentofPokerTrackersymbolslikePT_SmallBlind_VPIP.Symbol Explanation RemarksChair0StartingStackSize...Chair9StartingStackSize
StartingstacksizeofChairNatthebeginningofthehand(balance+currentbet).Measuredinbets,notindollars.
Mainlyforpreflop.Inotherbettingroundsitreturnsthestartingstackatthebeginningofthatround.
BigBlindCurrentBet,SmallBlindCurrentBet Currentbetsoftheblindposters,measuredindollars
Mainlyusedtodetect,iftheblindsaretruelyraisingoriftheyare“blindraisers”.
ConstCardTwo...ConstCardAce Namedcardconstantstoimprovereadabilityandmaintenability.UsefulifyouwanttoaccessOpenHoldem’scardsymbols$$pr0,
None
$$pr1,$$cr0...$$cr4.ConstBetRoundPreflop,ConstBetRoundFlop,ConstBetRoundTurn,ConstBetRoundRiver
Namedconstantsforthefourbettingrounds.TobeusedwithOpenHoldem’s“betround”symbol
None
CommonCard0Paired...CommonCard4Paired
True,iftherankofcommoncardNisequaltotherankofanothercommoncard.
Postfloponly
MaximumPossibleBetsizeIndollars MaximumPossiblebetsizeindollarsconsideringourcurrentbetandbalance
None
PT_LastCaller_Chair LastCallerChairnumber
None
RankOfSetOnBoard Rankofthesetonboard
Validonly,ifthereare3or4cardsofthesamerank,undefinedotherwise
\strikeoutoff\uulineoff\uwaveoffRankOfSpareCardWhenTwoPairOnBoard
\strikeoutoff\uulineoff\uwaveoffreturnsrankofthesparecardwhentwopaironboardontheriver
Riveronly
RankOfTopPairOnBoard returnsrankofthehighestpaironboard(truealsoifsetortwopairorfullhouseonboard)
Postfloponly
SidePot Potsize(innumberofblinds)wearenot
None
participatinginduetoopponent’sbetbeingbiggerthanthesumofourbalancepluscurrentbet.PotSizereturnseffectivepotsizebecauseSidePotamountissubtractedfromit.
SidePotInDollars Potsize(indollars)wearenotpartecipatinginduetoopponent’sbetbeingbiggerthanthesumofourbalancepluscurrentbet
None
EarlyPosition1Chair...MiddlePosition3Chair,CutOffChair,ButtonChair,SmallBlindChair,BigBlindChair
Chairnumbersofthespecificplayers.Couldbeusede.g.forsymbolslikePT_SmallBlind_VPIP
None
AggressorChair Samemeaningasac_aggressor,butmorereliable.ac_aggressoraloneissomewhatunreliable,asitgetsscraped(bybets).Butifweraiseandtherearesuper-fastcallsbehindus(e.g.atPokerAcademy),thenwedon’thavestableframesandsoonwewillswitchtothenextbettinground,soOpenHoldemmightmisstheaggressor.Thissymbolalsoconsidersourlast
None
actionandtheamounttocalltoovercomethisproblem.
SmallBlindRaising...ButtonRaising True,ifthechairinquestionisbettingorraising.ContrarytoOpenHoldem’sconventions“blindraisers”arenotcountedpreflop;onlyiftheytruelyraise.
Meantforpreflop,alsoworkingpostflop,thoughitcountsbetterstoo.
DocumentgeneratedbyeLyXer1.2.5(2013-03-10)on2014-12-12T11:48:15.587000
DifferencesToShankyAndOld-Style-PPLIfyouareabotterwhousedShanky-PPLinthepasttherearesomedifferencesyoushouldknowabout:
PlainTextOnly
ThedecipheringofencyptedPPLisabusiness-secretofShankyBonusBots.Wedon’tknowandwillneversupportthisdata-format.Ouraimistobuildanopen-sourcebotting-toolandnotamarketing-platformforshadysalesmen.ThereforeOpenPPLisplaintextonly—forprofilesyouownlegally,orevenbetter:forprofilesyoubuildonyourown.
NoOptionSettings
StandardShanky-PPLsupportsoptionsettingstoconfiguretheirbuilt-in-defaultbot;atleastthatwastheoldwaytodoso,butnowadaysmostofthesesettingsgetoverwrittenbytheprofileandhavenoeffectatall.OpenHoldemsbuilt-inGecko-botdoesnotsupportanyShanky-opttions;theyhavenoeffectandsimplygetignored.
MakePotSizedPreFlopRaisesWhen=6
FoldToPre-FlopRaisesForAQAJsKQ=OFF
FoldPost-FlopBelowTopPairToAnyBetOrRaise=OFF
FoldToPost-FlopRaisesWithUnpairedBoardsFor=2
...
custom
preflop
...
NoKeywordCustom
Asnobuilt-indefaultbotexiststhewholebot-logicis“custom”.Sure,wecouldignorethatsuperfluouskeyword,howeveritisanindicationofold-styleorShanky-style(Open)PPL.Therewillbemorethings“wrong”forsure,soweprefertoshowyouawarningasearlyaspossible.
Preflop,Flop,TurnandRiverSections
Thefourmaincode-sectionsarefunctions(technicallyspeaking),thereforetheyhaveOH-script-stylefunction-header-syntax:
##f$preflop##
WHEN...RaiseMaxFORCE
...
##f$flop##
##f$turn##
##f$river##
Atleastthef$preflop-sectionmustbepresentforOpenHoldemtoswitchtoOpenPPL-mode.
FloatingPointNumbers
TherearesomedifferencesbetweenStandardPPLandOpenPPLyoushouldcareabout—luckilyonlyveryfew:
StandardPPLusesintegerseverywhere,whereasOpenPPLusesfloatingpointnumbers.Anexample:inStandardPPLyoucouldwritecodelike:
WHENStacksize=1AND...RaiseBy1FORCE
WHENStacksize=2AND
oreven
WHENAmountToCall=70%Stacksize
whichwillcausetroubleswithOpenHoldem,becauseOpenHoldenusesrealnumberslike31.41.Thereforeitisrecommendedtouseinequality-operators,forexamplelikebelow:
WHENStacksize<1.5AND...RaiseBy1FORCE
WHENStacksize<2.5AND
Oryoucouldevenusethenewapproximately-equal-operator:
WHENStacksize~~3RaiseMaxFORCE
StandardPPL’ssymbolNutFullHouseOrFourOfAKinduseslowernumbersforbetterfullhousesorquads,but0fornofullhouseatall.ThisissomewhatinconsistentandOpenPPLusesahighnumber(999)forthatcase.
HandAndBoardExpressions
OpenHoldem’sformulaengineusesfloating-point-numbersinternallyandthereisnoeasywaytorepresentaboardofcardsasasinglefloating-point-number.Therecouldevenbevariousdifferentboard-expressionsattherightsideofanequalitycomparatorthatarealltrue.
WHENBoard=AT...
WHENBoard=ATSuited...
Thereforewedon’tsupportnativeShanky-syntaxherebutuseparameterizedsymbols
WHENboard$AT...
WHENboard$ATSuited...
CasesMatter(Partially)
OpenHoldemiscase-sensitive—contrarytostandardPPL.Thereforethecaseused(upperand/orlower)matters.TherulesforyourOpenPPLcodearemoreuser-friendlyandlessrigid.Threeareaswherecasematters:
Keywordslike“WHEN”,FORCEandoperatorslikeORetc.Forkeywords,threedifferentformatsareallowed:allupper-case,alllower-case,orareasonablemix.
WHEN(Hand$AA)RaiseMaxFORCE
When(Hand$AA)RaiseMaxForce
when(Hand$AA)RaiseMaxforce
Forbetterreadabilitywerecommendtouseonlyupper-caseforkeywords.OpenHoldemsymbols.NativeOpenHoldemsymbolsarecase-sensitiveandalwayslower-case.
WHEN(pt_vpip0<0.10)FoldFORCE
WHEN(balance0<50)RaiseMaxFORCE
However:youwillprobablyusethesesymbolsveryrarelyinyourcode.Probablyonlytocreatepoker-logicalsymbolslikePT_OpenRaiser_VPIPandBigBlindStackSize.OpenPPL-symbolsthatarepartofthelibrary.Theyarecase-sensitiveOH-script-functionswithmixedupperandlowercaseletters.
WHEN(StillToAct<2)RAISETO3FORCE
Thenamingisprettyintuitive,butthefunctionthatgenerateserror-messagesissmartenoughtolookforsimilarnamedsymbolsandwillshowyouahelpfulwarningifsomethingiswrong.
FalseFriends
Again:case-sensitivitymatters.Therearesome(onlythree)symbolswiththe“same”namethathaveadifferentmeaningforOH-scriptandOpenPPL.Symbol Meaningbet Theminimumbetforthecurrentbet-round,measured
indollarsBet Theactionmin-bet(equivalenttomin-raise)call Theamountyouneedtocall,measuredindollarsCall Theaction“Call”.random Generatesnumbersintherange[0..1)Random Generatesintegernumbersintherange[0..99]Youprobablywon’tneedtheOH-scriptsymbols,butatleastthelibraryofOpenPPL-functionsusestheminternally,sotheyhavetobethere.ForthefirsttwocasesOpenHoldem’sparsercandetectifyoutookanidentifierinsteadofanactionandwillwarnyouaboutthat.Butatthemomentyouneedtotakecareaboutthelattercase.
Keyword“Set”ForUser-DefinedVariables
Longstoryshort:Shanky-PPLisaneasy,English-likelanguagethatisintuitivetouse,butitcontainssometechnicalflaws.Forexample,itcan’tbeparsedwithaone-token-look-aheadlikeallothermodernprogramminglanguages.Thiscomplicatestheparserandespeciallythegenerationofgood,helpfulerror-messages.Thereforewehadtodeviateatsomepointsaliitlebit.Themostconspicuouspointisthenewkeyword“Set”beforeauser-variable:
WHEN...Setuser_utg_limp_raised_preflop
NoShanky-StyleDelaypreflop
WHEN...RaiseBy3Delay5FORCE
Auser-defineddelayafteranactionsimplydoesnotfittheconceptoffunctions,thattraditionallyreturnonlyasinglevalue.Besidesthat:webelievethatitisveryclumsytohavethousandsoflineswithafixeddelay.OpenHoldemnativelysupportsasolutionthatiswaybettersuitedforthisuse-case:af$delay-functions.Itrequiresonlysome(orsomedozen)linesofcodeforperfectrandomizeddelays,dependinge.g.onboard-texture,betting-actions,etc.
##f$delay##
WHENUncoordinatedFlopANDRandom<10RETURN2500FORCE
WHEN...
f$sitoutFunction
ForsimilarreasonsOpenPPLdoesnolongersupportaSitOut-command.Weprefertoseparatetheplayinglogicfromhopper-logic.ThereforeOpenHoldemhasaf$sitout-function.FurthermoreOpenHoldemsupportsf$sitin,f$autopost,f$leave,f$closeandsomemore.
##f$InUTG##
WHEN(dealposition=3)RETURNTrueFORCE
##f$sitout##
//issittingin,handsplayedandfloppctareOpenHoldemsymbols
//thatcanbeusedlikeanyotherOpenPPLsymbol.
//Wewaituntiltheorbitisfinishedandsitout
//beforewehavetopostthebigblindagain.
WHEN(issittingin
ANDhandsplayed>15
ANDfloppct<0.20
ANDHaveNoCards
ANDInUTG)
RETURNTrueForce
RaiseByAndRaiseToActions
Let’sassumethefollowingsituation:yousitinthebigblindandhadtopay$10.Everybodyfoldstothebuttonwhoraisesto$30.Nowitisyourturnagainandyoudecidetoenter“90”intotheraise-box.Whatdoesthismean?Well,itdependsonthecasino.
atsomecasinos$90willbeyourfinalbetsize(RaiseTo,betsizeinterpretationmethod=3)othercasinoswilladd$90tothe$10youalreadyposted,sothefinalbetsizewillbe$100(betsizeinterpretationmethod=2).andfinallysomeothercasinoswilladdthese$90tothe$30ofthelastraiser,sothefinalbetsizewillbe$120(RaiseBy,betsizeinterpretationmethod=1)
HowdoesShankyhandlethisBabylonianconfusion?
Inonecasethesmallblindiscountedaspartofthepotandintheotheritisnot.Thiscanvarybetweenpokerroomsaswell.Youjusthavetoexperimenttogetitwhereyoulikeandsaveeachprofilethewayyouwantit.
(Egorathttp://bonusbots.com/support/index.php/topic,7934.msg79372.html#msg79372
Howeverwedon’tlikeundefinedbehaviourandwedon’twanttokeepmultipleversionsofourbotsfordifferentcasinoseither.Thereforeweintroduced2newcommands:RaiseToandRaiseBy.Thiswayyoucanclearlyspecifywhatbehaviouryouwant.YouonlyhavetospecifythecorrectbetsizeinterpretationmethodinyourtablemaptotellOpenHoldemhowyourcasinobehavesandOpenHoldemwillcareaboutalltherest.automatically.That’showitshouldbe.
Gecko,OurDefaultBotTheGeckostory
Weoncehadanold-school-membercalledGeckofromtheNetherlands.GeckohadnoexperienceintheIT-business,buthewasareallydedicatedguy;ahardworkerandfastlearner.Geckoworkedroundtheclock,contributed500postspermonthtotheforum,reportedbugsSundaymorning4am.Overthecourseofthenextthreeyearsherewrotehisbotatleast20timesfromscratch,eachtimestructuringitabitbetterandmakingitstronger.HardworkpaysoffandsoGeckofinallygotawinningbotthatmadehimalittlefortune.Geckotradedhiswell-earnedbotting-moneyforsixrenovatedteeths,atwelf-maninternet-advertising-companyinPakistanandfreedomfromtheDutchpolice.OnedayGeckodecidedtovisithisemployeesinPakistan.Hetookhis$200-car(boughtfromallthemoneytheDutchpolicelefthim),foundthewaythroughthesnowymountainsofAustriaandsunnyGreece,missedPakistanbysomemilesbutdiscoveredThailandwherehenowlivesinhappiness.Geckofinallyquitbotting;butasatruegentlemanhegenerouslydonatedhispokerbottotheOpenHoldemcommunity.
Itsplayingstyle
LotsofpeopleusedtheGecko-botasabasefortheirownpoker-logic.Everybodypraiseditscoding-styleanditsgoodplay.Geckoplaysno-limitbig-stackinatight-aggressive(ormaybesemi-loose-aggressive)way.ItusesPokerTrackertoadapttoitsopponents,stealingmoreagainsttightblind-posters,value-bettingharderagainstcalling-stations,beingmorecautiousifapassiveplayergivesactionandmore.ForexampleGeckoispreparedtoplayforfullstackswithmid-pairagainsthyper-maniacs.TheGecko-botisbyfarthebestbotavailabletothepublicwehaveeverseen(demo-bots)orheardof(commercials).Ittriestosqueezetheslightestedgeinanaggressivemanner;sobepreparedforsomefunnyswings,hopefullymoreoftenintherightdirection.
DoesGeckoplaytournaments?
Tobehonest:notreally.Geckoisdesignedtoplaymanlybigstackandsqueezetheslightestedgeinanaggressivemanner.Butintournamentschip-EVandmoney-EVusuallydiffer(exceptforwinner-takes-it-all);tournamentsusuallygetplayedforsurvivalandtheyoftenendwithashortstackedpush-fold-phase.NothingGeckoisreallydesignedfor.TheGecko-botprobablyneedsalittletweakontopofitthattempersitsaggressionhereandtherealittlebitandcaresaboutICM.
UsingtheGecko-bot
TheGecko-botisnowfullyintegratedandOpenHoldemsdefault-bot.Itsitsinthebackgroundandwaitsforsituationswhereyourbot-logicdoesnotspecifyanaction.ThenGeckostepsin.YoucanuseGeckoinseveralways:
playpureGecko.Wheneveryourbot-logicisemptyornotloadedoryouclick“New”thenGeckowillcareabouteverythingandplayallgamesfromthebeginningtotheend.Inotherwords:forgettoloadyourbot-logicandincreaseyourwinnings.tweakGecko.IfGeckosatisfiesyouonly99%orifyouwanttoadaptittoothergame-typesliketournaments,thenyoucaneasilytweakit.Don’tworry:youdon’thavetochangeanythinginGeckoscodeandpossiblyruinit.Allyouhavetodo:createanewfilewiththeexceptionalsituationsthatyouwanttoplaydifferentlyandleavetherestunspecified.ThenOpenHoldemwillplayyourbot-logicandGeckowillcareaboutalltherest.Wecallthistypeofbot-logicaGecko-tweak.useGeckoasastarting-point.foryourowncompletebot.EvenifyouwanttocreateabotcompletelyfromscratchGeckowillbeuseful.Youcanstartyourbot-logicasaGecko-tweakandaslongasyourlogicisincompleteGeckowillcareabouttheforgottensituations.Soyoucanforexampletestyourhalf-madebotasifitwasalreadyfinished.don’tuseGeckoatall.Ifyouareoneofthefortunateold-school-memberswhoalreadyhaveacompleteandbetterbot,thenyoudon’thavetoworrythatGeckoruinsanything.YoucansafelydeletetheGecko-filefromthebotlogicfolderorjustterminateallevaluationswith
WHENOthers
WHENOthersFoldFORCE
DebuggingYourCodeWhydebugging?Ifyoucodeyourbotorifyouwatchitplayyouwillforsurefindsituationswheretheplaydoesn’tmatchyourexpectations.Sometimesyouknowimmediatellywhatyoudidwrongoratwhatplaceofthecodeyouhavetolookforyourerror.Butsometimesyoudon’tknoworitmightevenseem,thateverythinglooksokonyourside.Soyoumightwanttolookalittlebitdeeper-atyourcodeandmaybeevenatthesymbollibrary.Hereinthischapterwewillshowyousometechniquestolocatetheproblem:
Workingwiththedebug-tab
OpenHoldemprovidesacoolfeaturecalledthedebug-tab.Justopentheformula-editor(forOH-script),switchtothef$debug-sectionandthenyoucanenteryourexpressions.Forexample:
=userchair
=HaveTopPair
HereuserchairisanativeOpenHoldemsymbolandHaveTopPairisanOpenPPL-symbol.Soonceyouhaveenteredthesymbolsinquestionclick“Apply”toconfirmyourinputand“Auto”toturntheevaluatoron.OpenHoldemwillevaluateyourexpressionsandshowyoutheirvalues.Anythingwrongwiththem?
Everythingiscorrectwiththisscreenshot.Butifsomethingiswrong,theremightbeseveralreasons:
incorrectinput.HavealookatOpenHoldem’stabledisplay:everythingok?aproblemwithyourcode(orwiththesymbollibrary):asymbollikeforexampleStillToActdependsonothersymbolslikedealpositionandnchairsdealtleft.SoifStillToActwaswrongyoumightputthesesymbolsintothedebug-tabtoevaluatefurtheruntilyoufindtheproblem.
Simulatingpositions
Thedebug-tabisawonderfultool—but:theproblemhappenedatalive-table—whatcanyoudo?Therearetwothingsyoucouldtry:OpenholdemprovidesatoolcalledManualMode.Hereyoucansetupsomesituationstosimulateyourbot-logic.Theotherpossibility:youcouldshootso-calledreplay-frames,i.e.screenshotsofthecasino-tablethatgetsavedtothereplay-directoryinyourbot-folder.OncethesessionisoveryoucanloadtheseframeswithOHReplay.exeandconnectOpenHoldemtoOHReplaylikeanormalcasino-table.Andthenyoucanworkwiththedebug-tabasdescribedabove.PleaserefertoOpenHoldem’smanualforamoredetaileddescriptionofthesetools.
Investigatinglog-files
Notsatisfiedwiththeplay?Youmightalsolookattheautoplayer-log.Itisstoredinyourbot-folderandnamede.g.oh_0.log.OpenHoldemusesthisfiletonotonlystoretheactionittook,butalsothecompleteevaluationprocess.Firstlocateyourhand(youcanidentifyite.g.bythetime,yourcards,thehand-number,etc.).Atfirstthelogmightlooklikeacompletemess,butactuallyitiswellstructured:functionnamesontheveryleftarehigher-levelfunctions;symbolsthataremoreindentedgotcalledbythesehigher-levelfunctions.Sowhatyouseebelowisactuallyanevaluation-tree:
f$flop=-1000001.000[Line3/3]
HaveStraightDraw=0.000[Line2/2740]
HaveOpenEndedStraightDraw=0.000[Line10/2685]
HaveStraight=0.000[Line1/2735]
nstraightfill=3.000
rankbits=24770.000
HaveDoubleGutshotDraw=0.000[Line15/2286]
HaveQuads=0.000[Line1/2679]
isfourofakind=0.000
BotsLastAction=-1000008.000[Line20/549]
betround=2.000
ConstBetRoundPreflop=1.000[Line1/194]
me_re_MemBotsLastAction=0.000
Fold=-1000001.000[Line1/77]
PrevActionWasAllin=0.000[Line2/492]
prevaction=3.000
PrevActionWasAllin=0.000[cached]
Raise=-1000008.000[Line1/134]
Raise=-1000008.000[cached]
Fold=-1000001.000[cached]
Longstoryshort:
AttheverytopyouseeanOpenPPLmain-function,heref$flopBelowyouseefunctionsthatgetcalledbyf$flopeitherdirectlyorindirectlyFunctionsthatareindentedoncearedirectlycalledbyf$flop.E.gHaveStraightDraw,HaveQuads,BotsLastActionFunctionsthatareindentedoneleveldeeperarecalledbythefunctionabovethemthatwasindentedonelevelless,E.g.HaveStraightDrawcalls
HaveOpenEndedStraightDrawandHaveDoubleGutshotDraw.Afterthe=youseetheresultofthefunctionevaluation[Line10/2685]means:thefunctionreturnedtheresultatitstenthline,whichisline2685inthefile.[cached]meansthattheresultalreadygotcalculatedandthecachedvaluegetsreused.symbolswithoutlineinformationarebuilt-inOpenHoldemsymbols.
That’sit,basically.Wewereabitinahurrywhenwewrotethisparagraph.Anybetterexplanationisverywelcome.
ThingsToWatchOutFor
Incorrecthand-reset:Mostsymbolsdependonlyonthestateofthetable(cards,players,etc.)andarequitereliable.Howevertherearesomesymbols,thatdependonpreviousgame-states,likeBettingAction-symbols;thesesymbolsresetwheneveranewhandstarts.Alsouser-definedvariableswilllosetheirvalueifahand-resetoccurs.Thesehand-resetscanbetriggeredbycertainevents,likeachangingdealer-chairordisappearingcommunitycards,dependingonyourhand-reset-methoddefinedinthetablemap.Dependingonyoursettingsitmightbethatanocclusionofthetablewillcauseahand-resetforOpenHoldem.Sowatchoutformessageslikebelowinyourlog-file.
2012-01-2119:50:17-
*************************************************************
HANDRESET(num:dealer:0cards:KhKd):PartyPokerTable######-NLHold’em$1/$2
*************************************************************
2012-01-2119:50:17-ROUND1
Iftheyappearinthemiddleofahand,thenyoushouldrevisityourhand-reset-method.Misreadinformation:Mostproblems(andmostreported“bugs”)areofthefrom“garbagein-garbageout”.IfOpenHoldemgetsincorrectdatafromthescraper-engine(e.g.noseatedplayers)thenallfurthercalculationsbythesymbol-engineandtheevaluatorwillreturnbogusvalues.Thereasonisusuallysimple:abeginnerwithincorrectsystemsettingsorincorrectcasinosettings.Letusemphasize:Win2000classicthemeandallanimationsturnedoffarerecommended,butnotnecessary.Inproncipleyoucanscrapewhateverconfigurationyoulike.However:ifyouusesomebodyelse’stablemap,thenyouhavetouseexactlythesamesettingsastheprofilecreator.Sobeforeyougocrazyinvestigatinglog-files:havealookatbasicOpenHoldemsymbols:aretheyreasonableorplainwrong?Andbeforeyousitatareal-money-tableobserveyourbotandOpenHoldem’stable-displayforsometime:doesOpenHoldemrecognizeeverygame-statecorrectly?Don’tgetfrightened:screenscrapingisaneasyandveryflexibleapproach,thatworksgreat.Butitrequiressomecarefromyourside!
UsingFlags
OpenHoldemprovidesausefulsetofbuttonswithanumberonit,from0to19calledflags.WhenanOHflagbuttonispressedthencorrespondingsymbol(f0..f19)willbetrue.Forexampleourcodecouldlooklikethefollowing:
WHENbetround=2AND(BotRaisedBeforeFlopORf0)Raise50%FORCE
TheabovelineistrueifthebotraisedbeforetheFloportheflag0buttonhasbeenpressed.ThiswayyoucouldsimulatecostomconditionsinManualMode.
DocumentgeneratedbyeLyXer1.2.5(2013-03-10)on2014-12-12T07:42:07.449000
OpenPPLInPracticeIfyouhavereadthismanualuptothispointyouhavesomebasicunderstandingofOpenPPL:syntacticalrules,symbols,etc.Butthemainthing—turningyourpoker-knowledgeintobot-logic---maylooklikeadifferentkindofbeast,ifyouhavenoprogrammingexperienceatall.SoletustakesomesmallexamplesandseehowOpenPPLisusedinpractice.
FoldingTrash##list_of_biggest_trash##
//Trashyhands.
//Nevertobeplayed,exceptweareintheblinds
K8sK7sK6sK5sK4sK3sK2sQ7s...
K8o...32o
##f$preflop##
//Makelifeeasyandgetridofthegreatesttrash
WHENNOTInBigBlindANDlist_of_biggest_trashFoldFORCE
Open-RaisingOnTheButtonWHENStillToAct=2ANDCalls=0ANDRaises=0
WHENhand$AAORHand$KKOR...RaiseTo3FORCE
ThreebettingASteal-Raiser//LastRaiserPosition<=3means:CO,BUorSB
WHENCalls=0ANDRaises=1ANDLastRaiserPosition<=3
WHENAmountToCall<=3ANDlist...RaiseTo9FORCE
Contibetting##f$flop##
WHENBets=0ANDBotIsLastRaiser
WHENOpponents=1ANDRandom<80BetHalfPotFORCE
WHENOpponents=2ANDPosition=LastRaiseBy66%FORCE
EffectiveStackSize##f$EffectiveStacksize##
//Firstorbitprefloponly,asitusesMaxStillToActStackSize
WHENStackSize>MaxStillToActStackSizeRETURNMaxStillToActStackSizeFORCE
WHENOthersRETURNStackSizeFORCE
Push/FoldingInASNG//Goingintopush-fold-modewhenstacksizesaresmall
//Butbecareful!
//Wedon’twanttopushlooselyifsomethingiswrongwiththestacksize,
//e.g.becausethetablewasoccluded,sowecheck,ifitisnon-zero.
WHENEffectiveStacksize>0ANDEffectiveStacksize<=13
WHENCalls=0ANDRaises=0AND(Hand$...RaiseMaxFORCE
DetectingALimp-Raise//Firstactionpreflop
WHENBotsActionsOnThisRound=0ANDCalls>=1ANDRaises=0
//FirstCallerPositionislimitedtofirstorbitprefloponly,
//sowerememberit,makinguseofadvancedmemorysymbols
WHENOthersme_st_MemFirstCallerPosition_FirstCallerPosition
//Thencontinuewithnormalbot-logic
....
//Afterthatwecandetectalimp-raiselikethat
//(assuming,therearenootherraisersinthepot)
WHENLastRaiserPosition=me_re_MemFirstCallerPosition...
CountingOuts##f$MySimpleOutsCounter##
WHEN(HaveNutFlushDrawANDHaveNutStraightDraw)
//Wealreadyhave9+8-2duplicates
//Plusupto6undiscountedoutsforOvercards
//butsomemaybealreadycountedfortheflush
//(ifwewanttomakeitextragood,weshouldcheckthecolours
//ofourholecardswithOpenHoldemssymbols$$ps0and$$ps1)
//Theothersshouldbediscountedabit
WHEN(Overcards=2)RETURN18FORCE
WHEN(Overcards=1)RETURN16.5FORCE
WHEN(Overcards=0)RETURN15FORCE
WHEN(HaveNutFlushDraw)//ANDNOTHaveNutStraightDraw
WHEN(HaveInsideStraightDrawANDOvercards=2)...
...
CallingAccordingToOddsAndOuts##f$CardsLeft##
WHENbetround=2RETURN47FORCE
WHENbetround=3RETURN46FORCE
//Drawingatotherbetroundsdoesn’tmakemuchsense
WHENOthersRETURN-1FORCE
WHENAmountToCall/(AmountToCall+PotSize)>f$Outs/f$CardsLeftCallFORCE
PlayingFit-Or-FoldMultiway##f$HaveStrongDraw##
WHENHaveStraightDrawORHaveFlushDrawRETURNTrueFORCE
WHENHaveInsideStraightDrawANDOvercards=2RETURNTrueFORCE
##f$HaveTopPairOrBetter##
WHENHaveTopPairRETURNTrueFORCE
WHENHaveOverPairRETURNTrueFORCE
WHENHaveBestOverpairOrBetterRETURNTrueFORCE
##f$flop##
WHENOpponents>=3ANDNOT(f$HaveTopPairOrBetterORf$HaveStrongDraw)
WHENAmountToCall=0CheckFORCE
ClosingTheTables##f$leave##
WHENissittingout
ANDelapsedauto>300//5minuteswithoutaction
ANDnopponentsseated<4
RETURNTrueFORCE
Nowit’suptoyou.Letthefunbegin!
DocumentgeneratedbyeLyXer1.2.5(2013-03-10)on2015-09-29T21:48:00.750000
Ifyouwanttobuy......wedon’tsellanything.Howeverifyoureallyneed“more”thanyougethere,especiallybuilt-insupportforsomepokersites,awinningbotforthelowestmicrostakes(NL2—yes,thatareblindsof$0.01/$0.02)andprofessionalhand-holding,thenyoumightwanttoconsiderbuyingtheoriginalShanky-botatwww.bonusbots.com.Toourbestknowledgetheyofferanadvertisement-dealof$30or$50orsomethingforeverycustomerwhogetsreferred.However:wedoneitherwanttonorneedtomakeanymoneyadvertisingsuchfunnythingslike“winningpoker-bots”,butwedon’twanttowastethatmoneyeither.Soifyoureallybuytheirbot,pleaseregistertotheirforum,sendgreetingstoeverybodyandaskEgortosendthatmoneytoDoctorswithoutBorders.3337thAvenue,2ndFloorNewYork,NY10001-5004Phone:212-679-6800Fax:212-679-7016https://www.doctorswithoutborders.org/donate/Thankyouverymuchforyourhelpandcooperation!
DocumentgeneratedbyeLyXer1.2.5(2013-03-10)on2015-10-07T21:50:29.196000