Package com.barrybecker4.game.common

Examples of com.barrybecker4.game.common.MoveList


        return Math.pow(base, value / scale);
    }

    @Override
    public Range getDomain() {
        return new Range(0, Double.MAX_VALUE);
    }
View Full Code Here


        return (value - offset) / scale;
    }

    @Override
    public Range getDomain() {
        return new Range(Double.MIN_VALUE, Double.MAX_VALUE);
    }
View Full Code Here

    /**
     * Constructor.
     */
    public ErrorFunction() {
        interpolator = new LinearInterpolator(ERROR_FUNCTION);
        inverseInterpolator = new LinearInterpolator(INVERSE_ERROR_FUNCTION);
    }
View Full Code Here

     */
    protected boolean processToken(SGFToken token, MoveList moveList) {

        boolean found = false;
        if (token instanceof PlacementToken ) {
            Move move = createMoveFromToken( token );
            GameContext.log(2, "creating move="+ move);
            moveList.add( move );
            found = true;
        } else {
            GameContext.log(0, "ignoring token "+token.getClass().getName());
View Full Code Here

     */
    protected void restoreGame( SGFGame game )
    {
        parseSGFGameInfo(game);

        MoveList moveSequence = new MoveList();
        extractMoveList( game.getTree(), moveSequence );
        GameContext.log( 1, "move sequence= " + moveSequence );
        controller_.reset();

        for (Move m : moveSequence) {
View Full Code Here

    /**
     * Default constructor
     */
    public Board() {
        moveList_ = new MoveList();
    }
View Full Code Here

     * The computer makes the first move in the game.
     */
    @Override
    public void computerMovesFirst() {
        // determine the possible moves and choose one at random.
        MoveList moveList = getSearchable().generateMoves( null, weights_.getPlayer1Weights());

        assert (!moveList.isEmpty());
        makeMove( moveList.getRandomMove() );

        player1sTurn_ = false;
    }
View Full Code Here

    public MoveList generateMoves(TwoPlayerMove lastMove) {

        int j, row,col;
        boolean player1 = (lastMove == null) || !(lastMove.isPlayer1());
        MoveList moveList = new MoveList();

        // scan through the board positions. For each each piece of the current player's,
        // add all the moves that it can make.
        for ( row = 1; row <= CheckersBoard.SIZE; row++ ) {
            int odd = row % 2;
View Full Code Here

    /**
     *  generate all possible next moves.
     */
   @Override
   public MoveList generateMoves( TwoPlayerMove lastMove, ParameterArray weights) {
       MoveList moveList = new MoveList();
       int row,col;

       boolean player1 = (lastMove == null) || !(lastMove.isPlayer1());

       // scan through the board positions. For each each piece of the current player's,
View Full Code Here

    * TODO
    * @return those moves that result in check or getting out of check.
    */
   @Override
   public MoveList generateUrgentMoves(TwoPlayerMove lastMove, ParameterArray weights) {
       return new MoveList();
   }
View Full Code Here

TOP

Related Classes of com.barrybecker4.game.common.MoveList

Copyright © 2018 www.massapicom. 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.