Examples of GameWeights


Examples of com.barrybecker4.game.common.GameWeights

     * @param params2 set of weights for the other side
     * @return the amount that params1 are better than params2. May be negative if params2 are better.
     */
    @Override
    public double compareFitness( ParameterArray params1, ParameterArray params2 ) {
        GameWeights weights = controller_.getComputerWeights();
        weights.setPlayer1Weights(params1);
        weights.setPlayer2Weights(params2);
        double run1 = runComputerVsComputer();

        weights.setPlayer1Weights(params2);
        weights.setPlayer2Weights(params1);
        double run2 = runComputerVsComputer();

        double delta = run1 - run2;
        System.out.println("delta fitness = "+ run1 + " - " + run2 +" = " + delta );
        return delta;
View Full Code Here

Examples of com.barrybecker4.game.common.GameWeights

        super( parent );

        this.controller = controller;
        player = controller.getPlayers().get(showForPlayer1 ? 0 : 1);

        GameWeights gameWeights = controller.getComputerWeights();
        this.weights =
                showForPlayer1? gameWeights.getPlayer1Weights() : gameWeights.getPlayer2Weights();

        showContent();
    }
View Full Code Here

Examples of com.barrybecker4.game.common.GameWeights

        mainPanel.setLayout( new BorderLayout() );

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

        GameWeights gameWeights = controller.getComputerWeights();

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

        searchOptionsPanel = new SearchOptionsPanel(searchOptions);
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.