Unable to call a raise after bot raises

Coding-related discussion: OpenPPL (Poker Programming Language) and internal OpenHoldem-script
Partypoker562
First blood
First blood
Posts: 19
Joined: Fri Jan 27, 2023 1:35 pm

Unable to call a raise after bot raises

Post by Partypoker562 »

I am unable to code the bot to call a small raise after the bot raised. I tried everything on manual mode. I couldn't fix it.

BigBlindSize = 150
I have hand$A2. The bot raised to $400. The opponent raised to $600. The bot folded. I want the bot to call if the raise is less than 30% of my stacksize.


I tried the following codes:


WHEN OpponentsAtTable = 3 AND StackSize > 7 AND StillToAct = 3 AND BotsLastAction = Raise AND Raises = 1 AND BetSize <= 30% StackSize AND (PairInHand OR hand$A) Call FORCE

WHEN OpponentsAtTable = 3 AND StackSize > 7 AND StillToAct = 3 AND BotsLastAction = Raise AND BetSize <= 30% StackSize AND (PairInHand OR hand$A) Call FORCE

WHEN OpponentsAtTable = 3 AND StackSize > 7 AND StillToAct = 3 AND BotsLastAction = Raise AND ButtonRaising AND BetSize <= 30% StackSize AND (PairInHand OR hand$A) Call FORCE


Please help
Alex
Site Admin
Site Admin
Posts: 3112
Joined: Sun Mar 26, 2017 5:58 pm

Re: Unable to call a raise after bot raises

Post by Alex »

If you explore log file, you should see what part of your expression is not true, usually this is the way to debug such code lines.
I think StillToAct is the problem. If you read this closely: https://documentation.help/OpenPPL/Posi ... mbols.html
you will notice that StillToAct works only first orbit. So you can't use it after you made a move already (a raise or call)
Partypoker562
First blood
First blood
Posts: 19
Joined: Fri Jan 27, 2023 1:35 pm

Re: Unable to call a raise after bot raises

Post by Partypoker562 »

I changed StillToAct = 3 to InCutOff. It still doesn't work.

WHEN OpponentsAtTable = 3 AND StackSize > 7 AND InCutOff AND BotsLastAction = Raise AND Raises = 1 AND BetSize <= 30% StackSize AND (PairInHand OR hand$A) Call FORCE


Do you recommend any codes for 2 orbit? I want to call a small raise after the bot raises.

Blinds = $50/$100
Bot raises hand$AJ to $300
Opponent raises to $450
Bot folds

I want the bot to call this $150 raise.
User avatar
froggy
Botter for life
Botter for life
Posts: 1137
Joined: Thu Jan 31, 2019 12:56 am

Re: Unable to call a raise after bot raises

Post by froggy »

I have some personal reservations about this line.

What if you have 200 BBs on the table.

Table has 3 opponents.
Hero, sitting in cutoff, opens bet to 3 BB.
Next to act goes all in with 50 BB.
Hero calls.

OpponentsAtTable = 3. check.
StackSize > 7. check.
InCutOff . check.
BotsLastAction = Raise. check.
Raises = 1. <this is the problem code btw>
BetSize <= 30% StackSize. check. Based on personal experience, I prefer AmountToCall vs. BetSize
PairInHand OR hand$A. check.
“Life is not always a matter of holding good cards, but sometimes, playing a poor hand well.” ― Jack London
User avatar
froggy
Botter for life
Botter for life
Posts: 1137
Joined: Thu Jan 31, 2019 12:56 am

Re: Unable to call a raise after bot raises

Post by froggy »

You can keep the StackSize filter, but the comparison should really be done on the PotSize to determine whether the raise is big/small. That's my 2 cents, anyway.
“Life is not always a matter of holding good cards, but sometimes, playing a poor hand well.” ― Jack London
Partypoker562
First blood
First blood
Posts: 19
Joined: Fri Jan 27, 2023 1:35 pm

Re: Unable to call a raise after bot raises

Post by Partypoker562 »

I understand your concern about the above code. It's for a SNG. I changed the code and removed "raises = 1." It still doesn't work.

Below is my revised code:
WHEN OpponentsAtTable = 3 AND StackSize > 7 AND InCutOff AND BotsLastAction = Raise AND AmountToCall <= 30% StackSize AND (PairInHand OR hand$A) Call FORCE

What do I need to change in the code to make it work?
User avatar
froggy
Botter for life
Botter for life
Posts: 1137
Joined: Thu Jan 31, 2019 12:56 am

Re: Unable to call a raise after bot raises

Post by froggy »

try this:

WHEN OpponentsAtTable = 3 AND StackSize > 7 AND InCutOff AND (BotsLastAction = Raise OR BotsLastAction = Bet) AND AmountToCall <= 30% StackSize AND (PairInHand OR hand$A) Call FORCE
“Life is not always a matter of holding good cards, but sometimes, playing a poor hand well.” ― Jack London
Alex
Site Admin
Site Admin
Posts: 3112
Joined: Sun Mar 26, 2017 5:58 pm

Re: Unable to call a raise after bot raises

Post by Alex »

Partypoker562 wrote: Tue Apr 04, 2023 4:29 am I changed StillToAct = 3 to InCutOff. It still doesn't work.

WHEN OpponentsAtTable = 3 AND StackSize > 7 AND InCutOff AND BotsLastAction = Raise AND Raises = 1 AND BetSize <= 30% StackSize AND (PairInHand OR hand$A) Call FORCE


Do you recommend any codes for 2 orbit? I want to call a small raise after the bot raises.

Blinds = $50/$100
Bot raises hand$AJ to $300
Opponent raises to $450
Bot folds

I want the bot to call this $150 raise.
I've tested this line in ManualMode:

Code: Select all

WHEN (OpponentsAtTable = 3) AND (StackSize > 7) AND InCutOff AND (BotsLastAction = Raise) AND (Raises = 1) AND (BetSize <= 0.3*StackSize) AND (PairInHand OR hand$A) Call FORCE
it worked.
Keep in mind: OpponentsAtTable is # of seated and holding cards opponents at the 1st second of hand.
When hand starts, the bot remembers # of those opponents.
If expression is still not working, try to experiment with OpponentsAtTable. Or even better, explore log file and find out which function was wrong
Partypoker562
First blood
First blood
Posts: 19
Joined: Fri Jan 27, 2023 1:35 pm

Re: Unable to call a raise after bot raises

Post by Partypoker562 »

Hey Froggy,

Thanks for your advice. I got it to work finally. Really appreciate it.
User avatar
froggy
Botter for life
Botter for life
Posts: 1137
Joined: Thu Jan 31, 2019 12:56 am

Re: Unable to call a raise after bot raises

Post by froggy »

Partypoker562 wrote: Wed Apr 05, 2023 10:45 pm Hey Froggy,

Thanks for your advice. I got it to work finally. Really appreciate it.
:dance:
“Life is not always a matter of holding good cards, but sometimes, playing a poor hand well.” ― Jack London
Post Reply