Beispiel #1
0
        static void GeneralTest()
        {
            Random random = new NPack.MersenneTwister();

            Rules rules = new Rules {
                Decks = 8, MinBet = 100, MaxBet = 20000, Splits = 3
            };

            int    max_bet       = 5000;
            double pp_multiplier = 4.0;
            double ev_cutoff     = 0.0015;

            OptStrategy b1 = new OptStrategy(max_bet, ev_cutoff, pp_multiplier);
            //OptStrategy b2 = new OptStrategy(max_bet, ev_cutoff, pp_multiplier);
            BonusPairsStrategy b2 = new BonusPairsStrategy(100, max_bet, ev_cutoff);

            DualStrategy b = new DualStrategy(b1, b2);

            //PseudoOptStrategy b = new PseudoOptStrategy();

            Game game = new Game(rules, b, pp_multiplier, random);

            game.PlayerMoney = 0;
            double expected_money = (double)game.PlayerMoney;

            game.Bet = 100;             // 1$


            int lowest = game.PlayerMoney, highest = game.PlayerMoney;
            int runs = 0;

            while (true)
            {
                double total_money = (game.PlayerMoney + pp_multiplier * game.PartyPoints) / 100.0;
                if (runs % 10000 == 0)
                {
                    Console.WriteLine("runs: " + runs + " win: " + (double)game.PlayerMoney / 100.0 + "$" + " pp: " + game.party_points);
                    Console.WriteLine("lowest: " + (double)lowest / 100.0 + "$" + " highest: " + (double)highest / 100.0 + "$");
                    Console.WriteLine("total: " + total_money + "$ | expected: " + expected_money / 100.0 + "$");
                    Console.WriteLine();
                }

                game.StartRound();
                game.DealRound();

                expected_money += b.ShoeEV() * game.Bet;

                if (game.PlayerMoney < lowest)
                {
                    lowest = game.PlayerMoney;
                }
                if (game.PlayerMoney > highest)
                {
                    highest = game.PlayerMoney;
                }

                runs++;
            }
        }
Beispiel #2
0
        static void GeneralTest()
        {
            Random random = new NPack.MersenneTwister();

            Rules rules = new Rules { Decks = 8, MinBet = 100, MaxBet = 20000, Splits = 3 };

            int max_bet = 5000;
            double pp_multiplier = 4.0;
            double ev_cutoff = 0.0015;

            OptStrategy b1 = new OptStrategy(max_bet, ev_cutoff, pp_multiplier);
            //OptStrategy b2 = new OptStrategy(max_bet, ev_cutoff, pp_multiplier);
            BonusPairsStrategy b2 = new BonusPairsStrategy(100, max_bet, ev_cutoff);

            DualStrategy b = new DualStrategy(b1, b2);

            //PseudoOptStrategy b = new PseudoOptStrategy();

            Game game = new Game(rules, b, pp_multiplier, random);

            game.PlayerMoney = 0;
            double expected_money = (double)game.PlayerMoney;
            game.Bet = 100; // 1$

            int lowest = game.PlayerMoney, highest = game.PlayerMoney;
            int runs = 0;

            while (true)
            {
                double total_money = (game.PlayerMoney + pp_multiplier * game.PartyPoints) / 100.0;
                if (runs % 10000 == 0)
                {
                    Console.WriteLine("runs: " + runs + " win: " + (double)game.PlayerMoney / 100.0 + "$" + " pp: " + game.party_points);
                    Console.WriteLine("lowest: " + (double)lowest / 100.0 + "$" + " highest: " + (double)highest / 100.0 + "$");
                    Console.WriteLine("total: " + total_money + "$ | expected: " + expected_money / 100.0 + "$");
                    Console.WriteLine();
                }

                game.StartRound();
                game.DealRound();

                expected_money += b.ShoeEV() * game.Bet;

                if (game.PlayerMoney < lowest)
                    lowest = game.PlayerMoney;
                if (game.PlayerMoney > highest)
                    highest = game.PlayerMoney;

                runs++;
            }
        }