public override int TimeOnDoubleOffer(GameState gamestate, DoubleResponseHint hint)
 {
     return 0;
 }
Ejemplo n.º 2
0
 public abstract int TimeOnDoubleOffer(GameState gamestate, DoubleResponseHint hint);
Ejemplo n.º 3
0
 public override int TimeOnDoubleOffer(GameState gamestate, DoubleResponseHint hint)
 {
     return random.Next(2000, 4000);
 }
 public override int TimeOnDoubleOffer(GameState gamestate, DoubleResponseHint hint)
 {
     //  Parameter   Values
     //  Mean        2000 ms
     //  Minimum     1000 ms
     //  Maximum     20000 ms
     //  Deviation   2.0 (95.4% are within 5000 ms from mean)
     return (int)(coefficient * Gaussian.Next(2000, 1000, 20000, 2000, 2.0));
 }
Ejemplo n.º 5
0
 private Vector ToDoubleInput(GameState gs, DoubleResponseHint hint)
 {
     return new Vector(hint.TakeEq, hint.PassEq, System.Math.Abs(hint.PassEq - hint.TakeEq));
 }
Ejemplo n.º 6
0
        // Where's the randomness? Possibilities:
        // Category the actions and pick one randomly from the cat's set of actions (or approximate by some probability distribution etc.)
        // Sort a list from best to worst distances and pick randomly from that list (top N candidates - uniform random or normal)
        public override int TimeOnDoubleOffer(GameState gamestate, DoubleResponseHint hint)
        {
            Vector v = ToDoubleInput(gamestate, hint);

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

            doubles.Sort(Compare);

            return (int)doubles[0].Key.Time;
        }
Ejemplo n.º 7
0
        public override int TimeOnDoubleOffer(GameState gamestate, DoubleResponseHint hint)
        {
            int total = 0;

            if (random.Next(10) == 0)
                total += random.Next(8000);

            if (random.Next(5) == 0)
                total += random.Next(4000);

            return random.Next(500, 1500);
        }