Examples of AlphaBeta


Examples of aima.core.search.adversarial.AlphaBeta

  @Override
  public int getAlphaBetaValue(GameState state) {

    if (getPlayerToMove(state).equalsIgnoreCase("X")) {
      AlphaBeta initial = new AlphaBeta(Integer.MIN_VALUE,
          Integer.MAX_VALUE);
      int max = maxValue(state, initial);
      return max;

    } else {
      // invert?
      AlphaBeta initial = new AlphaBeta(Integer.MIN_VALUE,
          Integer.MAX_VALUE);
      return minValue(state, initial);
    }
  }
View Full Code Here

Examples of aima.core.search.adversarial.AlphaBeta

    t.makeMove(1, 2); // x
    t.makeMove(1, 1); // o

    t.makeMove(2, 1); // x

    int minValue = t.minValue(t.getState(), new AlphaBeta(
        Integer.MIN_VALUE, Integer.MAX_VALUE));
    Assert.assertEquals(0, minValue);
  }
View Full Code Here

Examples of org.gnubridge.search.pruning.AlphaBeta

  }

  public void configure(DoubleDummySolver doubleDummySolver) {
    if (isUseAlphaBetaPruning()) {
      doubleDummySolver.addPostEvaluationPruningStrategy(new AlphaBeta());
    }

  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.