diff --git a/bot.py b/bot.py index a2678a0..28c0dcd 100644 --- a/bot.py +++ b/bot.py @@ -39,7 +39,7 @@ def updateVars(self): for k, v in self.oh.items(): self.oh[k] = OpenHoldem.getSymbol(k) print(f'{k}: {self.oh[k]}\n') - self.phr = (169.0 - self.oh['handrank169'])/169.0 + self.phr = (170.0 - self.oh['handrank169'])/169.0 self.inv = 1.0/self.oh["nplayersplaying"] print(f'1/nplayers: {self.inv}\n') if self.oh["betround"] == 1: @@ -61,37 +61,38 @@ def preFlopDecision(self): print(f'phr: {self.phr}\n') if 0.95 < self.phr: if self.timesActed() == 0: - decision = self.oh["call"] + max(self.oh["pot"], 4*self.oh["bblind"]) + decision = (self.oh["currentbet"] + min(self.oh["balance"], self.oh["call"] + max(self.oh["pot"], 4.0*self.oh["bblind"]))) / self.oh["bblind"] else: - decision = self.oh["balance"] + decision = (self.oh["currentbet"] + self.oh["balance"]) / self.oh["bblind"] print('-> 0.95\n') - elif 0.85 < self.phr and self.oh["call"] <= 30*self.oh["bblind"]: + elif 0.85 < self.phr and self.oh["call"] <= 13.0*self.oh["bblind"]: if self.timesActed() == 0: - decision = self.oh["call"] + max(self.oh["pot"]/2, 4*self.oh["bblind"]) + decision = (self.oh["currentbet"] + min(self.oh["balance"], self.oh["call"] + max(self.oh["pot"]/2.0, 4.0*self.oh["bblind"]))) / self.oh["bblind"] else: - decision = self.oh["call"] + decision = OpenHoldem.getSymbol("Call") print('-> 0.85\n') - elif 0.70 < self.phr and self.oh["call"] <= 10*self.oh["bblind"]: + elif 0.70 < self.phr and self.oh["call"] <= 3.0*self.oh["bblind"]: if self.timesActed() == 0: - decision = self.oh["call"] + decision = OpenHoldem.getSymbol("Call") print('-> 0.70\n') - decision = self.oh["currentbet"] + min(self.oh["balance"], decision) return decision def postFlopDecision(self): decision = 0.0 - min_bet = max(2*self.oh["call"], self.oh["bblind"]) + min_bet = max(2.0*self.oh["call"], self.oh["bblind"]) if 0.40 < self.oh["prwin"] - self.inv: if self.timesActed() == 0: - decision = self.oh["call"] + max(min_bet, self.oh["pot"]) + decision = (self.oh["currentbet"] + min(self.oh["balance"], self.oh["call"] + max(min_bet, self.oh["pot"]))) / self.oh["bblind"] else: - decision = self.oh["balance"] + decision = (self.oh["currentbet"] + self.oh["balance"]) / self.oh["bblind"] + print('Big Raise') elif 0.1 < self.oh["prwin"] - self.inv and math.isclose(0, self.oh["call"], rel_tol=1e-6) and self.gotcaught == False: - decision = self.oh["call"] + max(min_bet, self.oh["pot"]/2) + decision = (self.oh["currentbet"] + min(self.oh["balance"], self.oh["call"] + max(min_bet, self.oh["pot"]/2.0))) / self.oh["bblind"] + print('small raise') self.ibluffed = True elif self.oh["call"] < self.callExpectedValue(): - decision = self.oh["call"] - decision = self.oh["currentbet"] + min(self.oh["balance"], decision) + decision = OpenHoldem.getSymbol("Call") + print('just calling') return decision def getDecision(self): diff --git a/python.ohf b/python.ohf index a9a9995..97accac 100644 --- a/python.ohf +++ b/python.ohf @@ -3,11 +3,11 @@ ##f$betpot_1_1## -me_re_dec - currentbet - call == pot ? 1 : 0 + ##f$betpot_1_2## -me_re_dec - currentbet - call == pot/2 ? 1 : 0 + ##f$betsize## @@ -15,15 +15,14 @@ me_re_dec - currentbet - call == pot/2 ? 1 : 0 // OpenHoldem will auto-adapt the betsize to the casinos input-requirements. // Please define your tablemaps "betsizeinterpretationmethod" // to configure this feature. -me_re_dec - currentbet - call > 0 ? me_re_dec : 0 ##f$raise## -me_re_dec - currentbet - call > 0 ? 1 : 0 + ##f$call## -(me_re_dec - currentbet - call >= 0) || (call == balance AND me_re_dec > currentbet) ? 1 : 0 + ##f$sitin## @@ -51,10 +50,6 @@ me_re_dec - currentbet - call > 0 ? 1 : 0 0 -##f$shoot_replay_frame## -1 - - ##f$ini_function_on_connection## 0 @@ -84,5 +79,29 @@ isfinalanswer ? me_st_dec_f$dlldecision : 0 = AmountToCall +##list_random_crap## +KK JJ 66 33 +A8s A3s KTs K7s K4s Q8s Q7s Q3s J8s J5s T7s 96s 94s 93s 85s 82s 63s 53s +A6o KTo K8o K5o QJo Q8o Q3o JTo J5o T6o 92o 87o 85o 84o 62o 43o + + +##f$preflop## +dll$decision + + +##f$flop## +dll$decision + + +##f$turn## +dll$decision + + +##f$river## +dll$decision + + ##f$dlldecision## -dll$decision \ No newline at end of file +dll$decision + +