示例#1
0
 public abstract int TimeOnTurnChanged(GameState gamestate, DoubleHint doubleHint, ResignHint resignHint);
 public override int TimeOnTurnChanged(GameState gamestate, DoubleHint doubleHint, ResignHint resignHint)
 {
     return 0;
 }
 public override int TimeOnTurnChanged(GameState gamestate, DoubleHint doubleHint, ResignHint resignHint)
 {
     return random.Next(500, 1000);
 }
        public override int TimeOnTurnChanged(GameState gamestate, DoubleHint doubleHint, ResignHint resignHint)
        {
            // Player has captured pieces, think less time.
            if (gamestate.Board.CapturedCount(gamestate.PlayerOnRoll) > 0)
                return (int)(coefficient * Gaussian.Next(700, 250, 20000, 500, 2.0));

            if (!gamestate.CanDouble())
                return (int)(coefficient * Gaussian.Next(400, 500, 20000, 1500, 2.0));

            //  Parameter   Values
            //  Mean        1000 ms
            //  Minimum     500 ms
            //  Maximum     20000 ms
            //  Deviation   2.0 (95.4% are within 2000 ms from mean)
            return (int)(coefficient * Gaussian.Next(1000, 1000, 20000, 1700, 2.0));
        }
示例#5
0
        public override int TimeOnTurnChanged(GameState gamestate, DoubleHint doubleHint, ResignHint resignHint)
        {
            Vector v = ToTurnInput(gamestate, doubleHint);

            foreach (KeyValuePair<GameStateAction, Vector> gv in turns)
            {
                gv.Value.Distance = Vector.ComputeDistance(gv.Value, v);
            }

            turns.Sort(Compare);

            foreach (KeyValuePair<GameStateAction, Vector> gv in turns)
            {
                Console.WriteLine(gv.Key.Time + " " + gv.Value.Distance);
            }
            Console.WriteLine(turns.Count);

            return (int)turns[0].Key.Time;
        }
        public override int TimeOnTurnChanged(GameState gamestate, DoubleHint doubleHint, ResignHint resignHint)
        {
            if (random.Next(15) == 0)
                return 300 + random.Next(800);

            return 200;
        }