Examples of ProbabilityParameterControl


Examples of org.uncommons.watchmaker.swing.ProbabilityParameterControl

            {
                sudokuView.setPuzzle(PUZZLES[puzzleCombo.getSelectedIndex()]);
            }
        });
        innerPanel.add(new JLabel("Selection Pressure: "));
        ProbabilityParameterControl selectionPressure = new ProbabilityParameterControl(Probability.EVENS,
                                                                                        Probability.ONE,
                                                                                        2,
                                                                                        new Probability(0.85d));

        selectionStrategy = new TournamentSelection(selectionPressure.getNumberGenerator());
        innerPanel.add(selectionPressure.getControl());
        innerPanel.add(new JLabel("Population Size: "));
        populationSizeSpinner = new JSpinner(new SpinnerNumberModel(500, 10, 50000, 1));
        innerPanel.add(populationSizeSpinner);
        SpringUtilities.makeCompactGrid(innerPanel, 3, 2, 0, 6, 6, 6);
        innerPanel.setBorder(BorderFactory.createTitledBorder("Configuration"));
View Full Code Here

Examples of org.uncommons.watchmaker.swing.ProbabilityParameterControl

        parameters.add(elitismSpinner);
        parameters.add(Box.createHorizontalStrut(10));

        parameters.add(new JLabel("Selection Pressure: "));
        parameters.add(Box.createHorizontalStrut(10));
        selectionPressureControl = new ProbabilityParameterControl(Probability.EVENS,
                                                                   Probability.ONE,
                                                                   2,
                                                                   new Probability(0.7));
        parameters.add(selectionPressureControl.getControl());
        parameters.add(Box.createHorizontalStrut(10));
View Full Code Here

Examples of org.uncommons.watchmaker.swing.ProbabilityParameterControl


    ProbabilitiesPanel()
    {
        super(new SpringLayout());
        addPolygonControl = new ProbabilityParameterControl(Probability.ZERO,
                                                            ONE_TENTH,
                                                            3,
                                                            new Probability(0.02));
        add(new JLabel("Add Polygon: "));
        add(addPolygonControl.getControl());
        addPolygonControl.setDescription("For each IMAGE, the probability that a new "
                                         + "randomly-generated polygon will be added.");

        addVertexControl = new ProbabilityParameterControl(Probability.ZERO,
                                                           ONE_TENTH,
                                                           3,
                                                           new Probability(0.01));
        add(new JLabel("Add Vertex: "));
        add(addVertexControl.getControl());
        addVertexControl.setDescription("For each POLYGON, the probability that a new "
                                        + "randomly-generated vertex will be added.");

        removePolygonControl = new ProbabilityParameterControl(Probability.ZERO,
                                                               ONE_TENTH,
                                                               3,
                                                               new Probability(0.02));
        add(new JLabel("Remove Polygon: "));
        add(removePolygonControl.getControl());
        removePolygonControl.setDescription("For each IMAGE, the probability that a "
                                            + "randomly-selected polygon will be discarded.");

        removeVertexControl = new ProbabilityParameterControl(Probability.ZERO,
                                                              ONE_TENTH,
                                                              3,
                                                              new Probability(0.01));
        add(new JLabel("Remove Vertex: "));
        add(removeVertexControl.getControl());
        removeVertexControl.setDescription("For each POLYGON, the probability that a "
                                           + "randomly-selected vertex will be discarded.");

        movePolygonControl = new ProbabilityParameterControl(Probability.ZERO,
                                                             ONE_TENTH,
                                                             3,
                                                             new Probability(0.01));
        add(new JLabel("Reorder Polygons: "));
        add(movePolygonControl.getControl());
        movePolygonControl.setDescription("For each IMAGE, the probability that the z-positions "
                                          + "of two randomly-selected polygons will be swapped.");

        moveVertexControl = new ProbabilityParameterControl(Probability.ZERO,
                                                            ONE_TENTH,
                                                            3,
                                                            new Probability(0.03));
        add(new JLabel("Move Vertex: "));
        add(moveVertexControl.getControl());
        moveVertexControl.setDescription("For each POLYGON, the probability that a randomly-selected "
                                         + "vertex will be displaced.");

        crossOverControl = new ProbabilityParameterControl(Probability.ZERO,
                                                           Probability.ONE,
                                                           2,
                                                           Probability.ONE);
        add(new JLabel("Cross-over: "));
        add(crossOverControl.getControl());
        crossOverControl.setDescription("For each PAIR of parent IMAGES, the probability that "
                                        + "2-point cross-over is applied.");

        changeColourControl = new ProbabilityParameterControl(Probability.ZERO,
                                                              ONE_TENTH,
                                                              3,
                                                              new Probability(0.01));
        add(new JLabel("Change Colour: "));
        add(changeColourControl.getControl());
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.