Пример #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));
        }
Пример #2
0
        public PlayerStats(string playerName, PokerClient client, TableType tableType, int vpipPositive, int vpipTotal,
                           ActionStats[] preFlopAD, ActionStats[] postFlopAD)
        {
            PlayerName = playerName;
            Client     = client;
            _tableType = tableType;
            VPIP       = new StatValue(vpipPositive, vpipTotal);

            _allPreFlopParams  = PreFlopParams.getAllParams(tableType);
            _allPostFlopParams = PostFlopParams.getAllParams(tableType);

            PreFlopStats  = preFlopAD;
            PostFlopStats = postFlopAD;
        }
Пример #3
0
        public PlayerStats(string playerName, PokerClient client, TableType tableType)
        {
            PlayerName = playerName;
            Client     = client;
            _tableType = tableType;
            VPIP       = new StatValue();

            _allPreFlopParams  = PreFlopParams.getAllParams(_tableType);
            _allPostFlopParams = PostFlopParams.getAllParams(_tableType);

            PreFlopStats  = new ActionStats[_allPreFlopParams.Count];
            PostFlopStats = new ActionStats[_allPostFlopParams.Count];

            for (int i = 0; i < PreFlopStats.Length; i++)
            {
                PreFlopStats[i] = new ActionStats();
            }

            for (int i = 0; i < PostFlopStats.Length; i++)
            {
                PostFlopStats[i] = new ActionStats();
            }
        }