Beispiel #1
0
        public int CalculateBidAmount(ConclusionAboutGame game)
        {
            game.MoveContext = MoveContext1000.Action;
            var hist = donwloadHistogram(game);
            int Tmp;

            return((Tmp = getScore(hist)) < 100 ? 100 : Tmp);
        }
Beispiel #2
0
        public Move1000 CalculateMove(ConclusionAboutGame game)
        {
            game.MoveContext = MoveContext1000.Game;
            var      hist     = donwloadHistogramFigure(game);
            int      MaxIndex = hist.FindMaxIndex();
            Move1000 m        = GetMove(MaxIndex);

            return(m);
        }
Beispiel #3
0
        private int[] donwloadHistogramFigure(ConclusionAboutGame game)
        {
            int[] hist = new int[104];//104 czyl dwie talie, miejsce na zapisanie meldunku
            List <StateGame1000> state = GetState(game);
            var cmp = ComputeMove(state);

            foreach (var item in cmp)
            {
                hist[(int)item.Item1.card + (item.Item1.Marriage ? 52 : 0)]++;
            }
            return(hist);
        }
Beispiel #4
0
        private int[] donwloadHistogram(ConclusionAboutGame game)
        {
            int[] hist = new int[MaxScore * 2];
            List <StateGame1000> state = GetState(game);
            var cmp = ComputeMove(state);

            foreach (var item in cmp)
            {
                int tmp;
                hist[MaxScore + (tmp = game.ReatingState(item.Item2))]++;
                System.Diagnostics.Debug.WriteLine($"wartość kalkulowana to {tmp}");
            }
            return(hist);
        }
Beispiel #5
0
 private List <StateGame1000> GetState(ConclusionAboutGame game)
 {
     return(Enumerable.Range(0, Tick).Select(X => game.GetStates()).ToList());
 }