Package com.barrybecker4.game.twoplayer.common.search.options

Examples of com.barrybecker4.game.twoplayer.common.search.options.SearchOptions


    }

    @Override
    protected GameOptionsDialog createOptionsDialog(Component parent, GameController controller )
    {
        return new GalacticOptionsDialog( parent, controller );
    }
View Full Code Here


     * display a dialog at the end of the game showing who won and other relevant
     * game specific information.
     */
    @Override
    public void showWinnerDialog() {
        GalacticTallyDialog tallyDialog = new GalacticTallyDialog(parent_, (GalacticController)controller_);
        tallyDialog.showDialog();
    }
View Full Code Here

     */
    private void showOrdersDialog(GalacticController gc) {

        GalacticPlayer currentPlayer = (GalacticPlayer)gc.getCurrentPlayer();

        OrdersDialog ordersDialog =
                new OrdersDialog(null, currentPlayer, gc.getNumberOfYearsRemaining());
        Point p = getParent().getLocationOnScreen();

        // offset the dlg so the Galaxy grid is visible as a reference
        ordersDialog.setLocation((int)(p.getX()+0.7*getParent().getWidth()), (int)(p.getY()+getParent().getHeight()/3.0));

        boolean canceled = ordersDialog.showDialog();
        if ( !canceled ) { // newGame a game with the newly defined options
            currentPlayer.setOrders( ordersDialog.getOrders() );
            gc.advanceToNextPlayer();
        }
    }
View Full Code Here

        super(name, color);
    }

    @Override
    protected SearchOptions createDefaultSearchOptions() {
        return new SearchOptions(new BruteSearchOptions(4), new BestMovesSearchOptions(100, 10, 0));
    }
View Full Code Here

        super(name, color);
    }

    @Override
    protected SearchOptions createDefaultSearchOptions() {
        return new SearchOptions(new BruteSearchOptions(2)new BestMovesSearchOptions(80, 10, 0));
    }
View Full Code Here

        this(name, color);
        searchOptions_ = searchOptions;
    }

    protected SearchOptions createDefaultSearchOptions() {
        return new SearchOptions();
    }
View Full Code Here

     * @param searchable the game controller that has options and can make/undo moves.
     * @param weights coefficients for the evaluation polynomial that indirectly determines the best move.
     */
    AbstractBruteSearchStrategy( Searchable searchable, ParameterArray weights ) {
        super(searchable, weights);
        SearchOptions opts = getOptions();
        BruteSearchOptions bruteOpts = opts.getBruteSearchOptions();
        alphaBeta_ = bruteOpts.getAlphaBeta();
        quiescence_ = bruteOpts.getQuiescence();
        lookAhead_ = bruteOpts.getLookAhead();
        maxQuiescentDepth_ = bruteOpts.getMaxQuiescentDepth();
        GameContext.log( 2, "alpha beta=" + alphaBeta_ + " quiescence=" + quiescence_ + " lookAhead = " + lookAhead_);
View Full Code Here

        // contains tabs for search, and weights
        JTabbedPane tabbedPanel = new JTabbedPane();

        GameWeights gameWeights = controller.getComputerWeights();

        SearchOptions searchOptions =
                ((TwoPlayerPlayerOptions)player.getOptions()).getSearchOptions();

        searchOptionsPanel = new SearchOptionsPanel(searchOptions);
        weightsPanel = new EditWeightsPanel(weights, gameWeights);
View Full Code Here

    }

    @Override
    protected SearchOptions createDefaultSearchOptions() {

        return new SearchOptions(new BruteSearchOptions(DEFAULT_LOOK_AHEAD),
                                new BestMovesSearchOptions(DEFAULT_PERCENTAGE_BEST_MOVES,
                                                           DEFAULT_MIN_BEST_MOVES,
                                                           DEFAULT_PERCENT_LESS_THAN_BEST_THRESH),
                                new MonteCarloSearchOptions(50, 1.0, 10));
    }
View Full Code Here

        super(name, color);
    }

    @Override
    protected SearchOptions createDefaultSearchOptions() {
        return new SearchOptions(new BruteSearchOptions(DEFAULT_LOOK_AHEAD),
                                 new BestMovesSearchOptions(DEFAULT_PERCENTAGE_BEST_MOVES,
                                                            DEFAULT_MIN_BEST_MOVES,
                                                            DEFAULT_PERCENTAGE_LESS_THAN_BEST_THRESH),
                                 new MonteCarloSearchOptions(200, 1.0, 8));
    }
View Full Code Here

TOP

Related Classes of com.barrybecker4.game.twoplayer.common.search.options.SearchOptions

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.