private void getPlayerToActAD(ref float betRaiseProb, ref float checkCallProb, BotGameState gameState) { var playerToAct = gameState.getPlayerToAct(); EstimatedAD ad = getPlayerToActAD(playerToAct, gameState); Debug.Assert(ad.PriorSamples > 0); betRaiseProb = ad.BetRaise.Mean; checkCallProb = ad.CheckCall.Mean; if (!canNextPlayerRaise(playerToAct, gameState)) { checkCallProb += betRaiseProb; betRaiseProb = 0.0f; } Console.WriteLine($"{playerToAct.Name} model stats: BR {betRaiseProb.ToString("f2")}; CC {checkCallProb.ToString("f2")};" + $" FO {(1 - betRaiseProb - checkCallProb).ToString("f2")} [prior smpls:{ad.PriorSamples}, updates:{ad.UpdateSamples}]"); }
public PlayerModel(PlayerModel oldModel) { TableType = oldModel.TableType; VPIP = oldModel.VPIP; PFR = oldModel.PFR; WTP = oldModel.WTP; AGG = oldModel.AGG; PreFlopAD = new EstimatedAD[oldModel.PreFlopAD.Length]; PostFlopAD = new EstimatedAD[oldModel.PostFlopAD.Length]; for (var i = 0; i < PreFlopAD.Length; i++) { PreFlopAD[i] = oldModel.PreFlopAD[i]; } for (var i = 0; i < PostFlopAD.Length; i++) { PostFlopAD[i] = oldModel.PostFlopAD[i]; } }