Exemple #1
0
        /**
         * {
         *   var progress = new Progress<int>(percent =>
         *    {
         *      textBox1.Text = percent + "%";
         *    });
         *
         *    // DoProcessing is run on the thread pool.
         *    await Task.Run(() => DoProcessing(progress));
         *    textBox1.Text = "Done!";
         *  }
         *
         *  public void DoProcessing(IProgress<int> progress)
         */
        public PlayerModel estimatePlayerModel(PlayerStats playerStats)
        {
            BaseModel baseModel = estimateBaseModel(playerStats);

            DifferencePair[] similarOppPreFlop  = getSimilarOpponents_PreFlop(baseModel.VPIP, baseModel.PFR);
            DifferencePair[] similarOppPostFlop = getSimilarOpponents_PostFlop(baseModel.Aggression, baseModel.WTP);

            var allPreFlopParams = PreFlopParams.getAllParams(TableType);
            var preFlopAD        = new EstimatedAD[allPreFlopParams.Count];

            for (int i = 0; i < allPreFlopParams.Count; i++)
            {
                preFlopAD[i] = estimateADPreFLop(playerStats, similarOppPreFlop, allPreFlopParams[i]);
            }

            var allPostFlopParams = PostFlopParams.getAllParams(TableType);
            var postFlopAD        = new EstimatedAD[allPostFlopParams.Count];

            for (int i = 0; i < allPostFlopParams.Count; i++)
            {
                postFlopAD[i] = estimateADPostFlop(playerStats, similarOppPostFlop, allPostFlopParams[i]);
            }

            return(new PlayerModel(TableType, baseModel.VPIP, baseModel.PFR, baseModel.WTP, baseModel.Aggression, preFlopAD, postFlopAD));
        }
Exemple #2
0
 public Unmanaged_ActionDistribution(EstimatedAD ad)
 {
     betRaiseProb  = ad.BetRaise.Mean;
     checkCallProb = ad.CheckCall.Mean;
     foldProb      = ad.Fold.Mean;
 }