示例#1
0
        public void Test_Kuhn_CA()
        {
            ChanceAbstractedGameDefParams testParams = new ChanceAbstractedGameDefParams(this, "Kuhn-CA", "kuhn.gamedef.xml",
                                                                                         new IChanceAbstraction[] { new KuhnChanceAbstraction(), new KuhnChanceAbstraction() },
                                                                                         0.001);

            SolveAndVerifyVerifySolution(testParams, false, false, new int[] { 100, -1 }, null);
        }
示例#2
0
        public void Test_Kuhn_CA()
        {
            ChanceAbstractedGameDefParams testParams = new ChanceAbstractedGameDefParams(this, "Kuhn-CA", "kuhn.gamedef.xml",
                                                                                         new IChanceAbstraction[] { new KuhnChanceAbstraction(), new KuhnChanceAbstraction() },
                                                                                         new double[] { -1.0 / 18, 1.0 / 18 },
                                                                                         0.0000000000005);

            Solve(testParams, false, null);
        }
示例#3
0
 public void Test_Kuhn_CA()
 {
     ChanceAbstractedGameDefParams testParams = new ChanceAbstractedGameDefParams(this, "Kuhn-CA", "kuhn.gamedef.xml",
                                                                                  new IChanceAbstraction [] { new KuhnChanceAbstraction(), new KuhnChanceAbstraction() },
                                                                                  new string[] { "eq-KunhPoker-0-s.xml", "eq-KunhPoker-1-s.xml" },
                                                                                  new double[] { -1.0 / 18, 1.0 / 18 },
                                                                                  0);
     // Set PrepareVis to true on purpose, to let it run too.
     GameValue gv = Solve(testParams, false, s => { s.PrepareVis = true; });
 }
示例#4
0
        public void Test_LeducHe_CA_Ocfr_JQ_K_pair_nopair()
        {
            var testParams = new ChanceAbstractedGameDefParams(this, "LeducHe-JQK", "leduc-he.gamedef.xml",
                                                               new IChanceAbstraction[] {
                new LeducHeChanceAbstraction(LeducHeChanceAbstraction.JQ_K_pair_nopair),
                new LeducHeChanceAbstraction(LeducHeChanceAbstraction.JQ_K_pair_nopair),
            },
                                                               _isDebug ? 0.01 : 0.005);

            SolveAndVerifyVerifySolution(testParams, false, false, new int[] { 100, -1 }, null);
        }
示例#5
0
        public void Test_LeducHe_CA_Ocfr_FullGame_FractionalResult()
        {
            var testParams = new ChanceAbstractedGameDefParams(this, "LeducHe-FG-FR", "leduc-he.gamedef.xml",
                                                               new IChanceAbstraction[] {
                new LeducHeChanceAbstraction(LeducHeChanceAbstraction.FullGame),
                new LeducHeChanceAbstraction(LeducHeChanceAbstraction.FractionalResult),
            },
                                                               _isDebug ? 0.01 : 0.005);

            testParams.EqualCa = false;
            SolveAndVerifyVerifySolution(testParams, false, false, new int[] { 100, -1 }, null);
        }
示例#6
0
        public void Test_LeducHe_CA_Trivial()
        {
            // Take the same value as for exact game because this abstraction is losless.
            var testParams = new ChanceAbstractedGameDefParams(this, "LeducHe-FG", "leduc-he.gamedef.xml",
                                                               new IChanceAbstraction[] {
                new TrivialChanceAbstraction(),
                new TrivialChanceAbstraction(),
            },
                                                               _isDebug ? 0.01 : 0.005);

            SolveAndVerifyVerifySolution(testParams, false, false, new int[] { 100, -1 }, null);
        }
示例#7
0
        public void Test_LeducHe_CA_Fullgame()
        {
            // Take the same value as for exact game because this abstraction is losless.
            double expValue   = 0.0428032120390257;
            var    testParams = new ChanceAbstractedGameDefParams(this, "LeducHe-FG", "leduc-he.gamedef.xml",
                                                                  new IChanceAbstraction[] {
                new LeducHeChanceAbstraction(LeducHeChanceAbstraction.FullGame),
                new LeducHeChanceAbstraction(LeducHeChanceAbstraction.FullGame),
            },
                                                                  new double[] { -expValue, expValue }, 0.0000000000005);

            Solve(testParams, false, null);
        }
示例#8
0
        public void Test_LeducHe_CA_Ocfr__JQ_K_pair_nopair__FractionalResult()
        {
            // Take average from 2 OCFR BRs and divide by 2 for our stakes.
            double expValue = (0.0375278 + 0.0370542) / 4;

            var testParams = new ChanceAbstractedGameDefParams(this, "LeducHe-JQK-FR", "leduc-he.gamedef.xml",
                                                               new IChanceAbstraction[] {
                new LeducHeChanceAbstraction(LeducHeChanceAbstraction.JQ_K_pair_nopair),
                new LeducHeChanceAbstraction(LeducHeChanceAbstraction.FractionalResult),
            },
                                                               new double[] { expValue, -expValue },
                                                               0.00025);

            Solve(testParams, false, null);
        }
示例#9
0
        public void Test_LeducHe_CA_Ocfr_FullGame_FractionalResult()
        {
            // Take average from 2 OCFR BRs and divide by 2 for our stakes.
            double expValue = (0.215496 + 0.215146) / 4;

            var testParams = new ChanceAbstractedGameDefParams(this, "LeducHe-FG-FR", "leduc-he.gamedef.xml",
                                                               new IChanceAbstraction[] {
                new LeducHeChanceAbstraction(LeducHeChanceAbstraction.FullGame),
                new LeducHeChanceAbstraction(LeducHeChanceAbstraction.FractionalResult),
            },
                                                               new double[] { expValue, -expValue },
                                                               0.00005);

            Solve(testParams, false, null);
        }
示例#10
0
        public void Test_LeducHe_CA_Ocfr_JQ_K_pair_nopair()
        {
            // Take average from 2 OCFR BRs and divide by 2 for our stakes.
            double expValue = (0.107228 + 0.107589) / 4;

            var testParams = new ChanceAbstractedGameDefParams(this, "LeducHe-JQK", "leduc-he.gamedef.xml",
                                                               new IChanceAbstraction[] {
                new LeducHeChanceAbstraction(LeducHeChanceAbstraction.JQ_K_pair_nopair),
                new LeducHeChanceAbstraction(LeducHeChanceAbstraction.JQ_K_pair_nopair),
            },
                                                               new double[] { -expValue, expValue },
                                                               0.00005);

            Solve(testParams, false, null);
        }
示例#11
0
        public void Test_LeducHe_CA_Ocfr__JQ_K_pair_nopair__FractionalResult()
        {
            var testParams = new ChanceAbstractedGameDefParams(this, "LeducHe-JQK-FR", "leduc-he.gamedef.xml",
                                                               new IChanceAbstraction[] {
                new LeducHeChanceAbstraction(LeducHeChanceAbstraction.JQ_K_pair_nopair),
                new LeducHeChanceAbstraction(LeducHeChanceAbstraction.FractionalResult),
            },
                                                               _isDebug ? 0.01 : 0.005);

            testParams.EqualCa = false;
            SolveAndVerifyVerifySolution(testParams, false, false, new int[] { 100, -1 }, s =>
            {
                s.IsVerbose           = true;
                s.EpsilonLogThreshold = 0;
                //s.IterationVerbosity = 1000;
                //s.MaxIterationCount = 2000;
            });
        }