Beispiel #1
0
        static void test_2x2_final()
        {
            GameState gs = new GameState();
            MinMax m = new MinMax(new SimpleCostFuntcion(Side.Zero), new HeuristicTrunsGenerator(new LineBasedTurnHeuristics()), 2);

            gs.Advance(new Position(3, 3), Side.Cross);
                gs.Advance(new Position(4, 3), Side.Zero);
            gs.Advance(new Position(4, 4), Side.Cross);
                gs.Advance(new Position(3, 4), Side.Zero);
            gs.Advance(new Position(6, 6), Side.Cross);
                gs.Advance(new Position(2, 5), Side.Zero);
            gs.Advance(new Position(7, 7), Side.Cross);

            Position p = m.FindTurn(gs);
            Console.WriteLine("Turn found {0},{1}", p.X, p.Y);
        }
Beispiel #2
0
 public SimplePlayer(Side s, int level)
 {
     this.Side = s;
     ai = new AI.MinMax.MinMax(new SimpleCostFuntcion(s), this.gen, level);
 }