.
Why “WHEN Others”?
Tweaking this way is easy. Now there is just one little technical pitfall. The profile to be tweaked might contain some one-line-statements at the top that always got executed. Now if you add your code on top of that profile the former one-line-statements would be bound to the last potential open-ended when-condition in your code. They would now only get executed if that open-ended when-condition was true. Therefore you have to terminate your last open-ended when-condition and start a new one that is always true:
WHEN Others // Always true
// former one-line-statements here
Now the former one-line-statements are guaranteed to get executed always again, independent of any conditions in your code.
Combining multiple Profiles
Of course it is possible to combine multiple profiles:
a complete profile that plays somewhat reasonable on bottom to cover all situations.
a tweaking, incomplete profile on top of it to fix the largest holes.
finally your own tweaking code on the very top of everything for the fine-tuning.
The final Action
Complete profiles usually end with the code
WHEN Others
WHEN Others Fold FORCE
This code first terminates the last open-ended when-condition and then folds everything. If your favourite demo-bot misses such a statement this is a clear sign that this profile is incomplete, i.e it is a tweak for some other profile. In this case it usually needs some code for completion; however if you are happy with it you can use this profile as is. Whenever OpenHoldem reaches the end of a function it will evaluate the end as zero / false / fold and take the action accordingly.
f$flop = 0.000 [Line 27/73]
…
empty_expression__false__zero__when_others_fold_force = 0.000
OpenPPL In Practice
If you have read this manual up to this point you have some basic understanding of OpenPPL: syntactical rules, symbols, etc. But the main thing — turning your poker-knowledge into bot-logic — may look like a different kind of beast, if you have no programming experience at all. So let us take some small examples and see how OpenPPL is used in practice.
Folding Trash
##list_of_biggest_trash##
// Trashy hands.
// Never to be played, except we are in the blinds
K8s K7s K6s K5s K4s K3s K2s Q7s…
K8o … 32o
##f$preflop##
// Make life easy and get rid of the greatest trash
WHEN NOT In BigBlind AND list_of_biggest_trash Fold FORCE
Open-Raising On The Button
WHEN StillToAct = 2 AND Calls = 0 AND Raises = 0
WHEN hand$AA OR Hand$KK OR … RaiseTo 3 FORCE
Threebetting A Steal-Raiser
// LastRaiserPosition <= 3 means: CO, BU or SB
WHEN Calls = 0 AND Raises = 1 AND LastRaiserPosition <= 3
WHEN AmountToCall <= 3 AND list... RaiseTo 9 FORCE
Contibetting
##f$flop##
WHEN Bets = 0 AND BotIsLastRaiser
WHEN Opponents = 1 AND Random < 80 BetHalfPot FORCE
WHEN Opponents = 2 AND Position = Last RaiseBy 66% FORCE
Effective StackSize
##f$EffectiveStacksize##
// First orbit preflop only, as it uses MaxStillToActStackSize
WHEN StackSize > MaxStillToActStackSize RETURN MaxStillToActStackSize FORCE
WHEN Others RETURN StackSize FORCE
Push/Folding In A SNG
// Going into push-fold-mode when stacksizes are small
// But be careful!
// We don’t want to push loosely if something is wrong with the stacksize,
// e.g. because the table was occluded, so we check, if it is non-zero.
WHEN EffectiveStacksize > 0 AND EffectiveStacksize <= 13
WHEN Calls = 0 AND Raises = 0 AND (Hand$… RaiseMax FORCE
Detecting A Limp-Raise
// First action preflop
WHEN BotsActionsOnThisRound = 0 AND Calls >= 1 AND Raises = 0
// FirstCallerPosition is limited to first orbit preflop only,
// so we remember it, making use of advanced memory symbols
WHEN Others me_st_MemFirstCallerPosition_FirstCallerPosition
// Then continue with normal bot-logic
….
// After that we can detect a limp-raise like that
// (assuming, there are no other raisers in the pot)
WHEN LastRaiserPosition = me_re_MemFirstCallerPosition …
Counting Outs
##f$MySimpleOutsCounter##
WHEN (HaveNutFlushDraw AND HaveNutStraightDraw)
// We already have 9 + 8 – 2 duplicates
// Plus up to 6 undiscounted outs for Overcards
// but some may be already counted for the flush
// (if we want to make it extra good, we should check the colours
// of our hole cards with OpenHoldems symbols $$ps0 and $$ps1)
// The others should be discounted a bit
WHEN (Overcards = 2) RETURN 18 FORCE
WHEN (Overcards = 1) RETURN 16.5 FORCE
WHEN (Overcards = 0) RETURN 15 FORCE
WHEN (HaveNutFlushDraw) // AND NOT HaveNutStraightDraw
WHEN (HaveInsideStraightDraw AND Overcards = 2)…
…
Calling According To Odds And Outs
##f$CardsLeft##
WHEN betround = 2 RETURN 47 FORCE
WHEN betround = 3 RETURN 46 FORCE
// Drawing at other betrounds doesn’t make much sense
WHEN Others RETURN -1 FORCE
WHEN AmountToCall / (AmountToCall + PotSize) > f$Outs / f$CardsLeft Call FORCE
Playing Fit-Or-Fold Multiway
##f$HaveStrongDraw##
WHEN HaveStraightDraw OR HaveFlushDraw RETURN True FORCE
WHEN HaveInsideStraightDraw AND Overcards = 2 RETURN True FORCE
##f$HaveTopPairOrBetter##
WHEN HaveTopPair RETURN True FORCE
WHEN HaveOverPair RETURN True FORCE
WHEN HaveBestOverpairOrBetter RETURN True FORCE
##f$flop##
WHEN Opponents >= 3 AND NOT (f$HaveTopPairOrBetter OR f$HaveStrongDraw)
WHEN AmountToCall = 0 Check FORCE
Closing The Tables
##f$Close##
WHEN issittingout
AND elapsedauto > 300 // 5 minutes without action
AND nopponentsseated < 4
RETURN True FORCE
Poker Tracker
##f$flop##
WHEN BotRaisedBeforeFlop and HaveNothing and Opponents = 1 and Raises = 0 and Bets = 0
WHEN Position = Last and pt_flop_checkraise_headsup 0.7 and pt_hands_headsup >80 RaiseTwoThirdPot FORCE
Now it’s up to you. Let the fun begin!
Wrong
WHEN ((hand$AA))
WHEN (BotsLastaction = Raise AND Raises >= 1 AND Calls = 0 AND StillToAct = 0 AND BetSize > 20) Call FORCE
Correctly
WHEN ((hand$AA))
WHEN (BotsLastAction = Raise AND Raises >= 1 AND Calls = 0 AND StillToAct = 0 AND BetSize > 20) Call FORCE
Wrong
WHEN ((hand$AA))
WHEN (BotsLastAction = Raise AND Raises >= 1 AND Calls = 0 AND StillToAct = 0 AND BetSize > 20 Call FORCE
Correctly
WHEN ((hand$AA))
WHEN (BotsLastAction = Raise AND Raises >= 1 AND Calls = 0 AND StillToAct = 0 AND BetSize > 20) Call FORCE
When done, you can profile download poker bot.
For:
Example:
1.
If the profile was loaded correctly, then there were no errors in it. Poker robot can be connected to the table and play!
OTHER FUNCTIONS THAT ARE BUILT INTO ROBOT
To enable, you only need to press the corresponding buttons on the bot module !
We made your hobby more simple. Your formula right now can only contain a couple of lines. The rest is embedded in the built-in logic of the game.It will support your logic during the game.
Example :
##f$preflop##
WHEN BotsActionsOnThisRoundIncludingChecks > 1 and (hand$AA OR hand$KK) RaiseMax FORCE
##f$flop##
WHEN HaveNothing and NOT (HaveOverPair OR HaveTopPair OR HaveTwoPair OR HaveSet OR HaveTrips OR HaveFlush OR HaveStraight OR HaveStraightFlush OR HaveQuads OR HaveFullHouse) Fold FORCE
##f$turn##
WHEN Raises>=1 and (HaveQuads OR HaveFullHouse) RaiseMax FORCE
##f$river##
WHEN BetSize>=1 and (HaveQuads OR HaveFullHouse) Raise FORCE
The ends of the scripts should be open. If the formula contains code
WHEN Others Fold FORCE
WHEN Others
WHEN Others Fold FORCE
delete it, otherwise the embedded logic will not work.
The built-in profile was developed by us and has little in common with what is in Openholdem.
14.Built-in preflop
15.Built-in flop
16.Built-in turn
17.Built-in river
18.Built-in profile (all the streets)
The sale of the program has been suspended indefinitely. The bot can be purchased here: https://t.me/pokerbot_Inhuman Dismiss
Recent Comments