Search in sources :

Example 1 with Parameter

use of aima.gui.fx.framework.Parameter in project aima-java by aimacode.

the class RouteFindingAgentApp method createParameters.

protected List<Parameter> createParameters() {
    Parameter p1 = new Parameter(PARAM_SCENARIO, "Romania, from Arad", "Romania, from Lugoj", "Romania, from Fagaras", "Australia, from Sydney", "Australia, from Random");
    p1.setValueNames("Romania, from Arad", "Romania, from Lugoj", "Romania, from Fagaras", "Australia, from Sydney", "Australia, from Random");
    Parameter p2r = new Parameter(PARAM_DESTINATION_R, "to Bucharest", "to Eforie", "to Neamt", "to Random");
    p2r.setValueNames("to Bucharest", "to Eforie", "to Neamt", "to Random");
    p2r.setDependency(PARAM_SCENARIO, "Romania, from Arad", "Romania, from Lugoj", "Romania, from Fagaras");
    Parameter p2a = new Parameter(PARAM_DESTINATION_A, "to Port Hedland", "to Albany", "to Melbourne", "to Random");
    p2a.setValueNames("to Port Hedland", "to Albany", "to Melbourne", "to Random");
    p2a.setDependency(PARAM_SCENARIO, "Australia, from Sydney", "Australia, from Random");
    Parameter p3 = new Parameter(PARAM_SEARCH, (Object[]) SearchFactory.getInstance().getSearchStrategyNames());
    p3.setDefaultValueIndex(5);
    Parameter p4 = new Parameter(PARAM_Q_SEARCH_IMPL, (Object[]) SearchFactory.getInstance().getQSearchImplNames());
    p4.setDefaultValueIndex(1);
    p4.setDependency(PARAM_SEARCH, "Depth First", "Breadth First", "Uniform Cost", "Greedy Best First", "A*");
    Parameter p5 = new Parameter(PARAM_HEURISTIC, "0", "SLD");
    p5.setDefaultValueIndex(1);
    p5.setDependency(PARAM_SEARCH, "Greedy Best First", "A*", "Recursive Best First", "Recursive Best First No Loops", "Hill Climbing");
    return Arrays.asList(p1, p2r, p2a, p3, p4, p5);
}
Also used : Parameter(aima.gui.fx.framework.Parameter)

Example 2 with Parameter

use of aima.gui.fx.framework.Parameter in project aima-java by aimacode.

the class VacuumAgentApp method createRootPane.

/**
     * Defines state view, parameters, and call-back functions and calls the
     * simulation pane builder to create layout and controller objects.
     */
@Override
public Pane createRootPane() {
    BorderPane root = new BorderPane();
    StackPane envView = new StackPane();
    envViewCtrl = new VacuumEnvironmentViewCtrl(envView);
    List<Parameter> params = createParameters();
    SimulationPaneBuilder builder = new SimulationPaneBuilder();
    builder.defineParameters(params);
    builder.defineStateView(envView);
    builder.defineInitMethod(this::initialize);
    builder.defineSimMethod(this::simulate);
    simPaneCtrl = builder.getResultFor(root);
    return root;
}
Also used : VacuumEnvironmentViewCtrl(aima.gui.fx.views.VacuumEnvironmentViewCtrl) BorderPane(javafx.scene.layout.BorderPane) SimulationPaneBuilder(aima.gui.fx.framework.SimulationPaneBuilder) Parameter(aima.gui.fx.framework.Parameter) StackPane(javafx.scene.layout.StackPane)

Example 3 with Parameter

use of aima.gui.fx.framework.Parameter in project aima-java by aimacode.

the class MapColoringCspApp method createRootPane.

/**
     * Defines state view, parameters, and call-back functions and calls the
     * simulation pane builder to create layout and controller objects.
     */
@Override
public Pane createRootPane() {
    BorderPane root = new BorderPane();
    StackPane stateView = new StackPane();
    stateViewCtrl = new CspViewCtrl<>(stateView);
    List<Parameter> params = createParameters();
    SimulationPaneBuilder builder = new SimulationPaneBuilder();
    builder.defineParameters(params);
    builder.defineStateView(stateView);
    builder.defineInitMethod(this::initialize);
    builder.defineSimMethod(this::simulate);
    simPaneCtrl = builder.getResultFor(root);
    return root;
}
Also used : BorderPane(javafx.scene.layout.BorderPane) SimulationPaneBuilder(aima.gui.fx.framework.SimulationPaneBuilder) Parameter(aima.gui.fx.framework.Parameter) StackPane(javafx.scene.layout.StackPane)

Example 4 with Parameter

use of aima.gui.fx.framework.Parameter in project aima-java by aimacode.

the class MapColoringCspApp method createParameters.

protected List<Parameter> createParameters() {
    Parameter p1 = new Parameter(PARAM_MAP, "Map of Australia", "Tree-Structured Map");
    Parameter p2 = new Parameter(PARAM_STRATEGY, "Backtracking", "Backtracking + MRV", "Backtracking + DEG", "Backtracking + LCV", "Backtracking + Forward Checking", "Backtracking + Forward Checking + MRV&DEG", "Backtracking + AC3", "Backtracking + AC3 + MRV&DEG + LCV", "Min-Conflicts (50)", "Tree-CSP-Solver", "Tree-CSP-Solver with Random Root");
    return Arrays.asList(p1, p2);
}
Also used : Parameter(aima.gui.fx.framework.Parameter)

Example 5 with Parameter

use of aima.gui.fx.framework.Parameter in project aima-java by aimacode.

the class GeneticMaximumFinderApp method createParameters.

protected List<Parameter> createParameters() {
    Parameter p1 = new Parameter(PARAM_FUNC_SELECT);
    p1.setValues(Functions.f1, Functions.f2, Functions.f3);
    p1.setValueNames("f1", "f2", "f3");
    Parameter p2 = new Parameter(PARAM_MUT_PROB, 0.0, 0.2, 0.5, 1.0);
    p2.setDefaultValueIndex(1);
    Parameter p3 = new Parameter(PARAM_POPULATION, 2, 10, 20, 100);
    p3.setDefaultValueIndex(2);
    Parameter p4 = new Parameter(PARAM_MAX_ITER, 100, 200, 400);
    p4.setDefaultValueIndex(0);
    return Arrays.asList(p1, p2, p3, p4);
}
Also used : Parameter(aima.gui.fx.framework.Parameter)

Aggregations

Parameter (aima.gui.fx.framework.Parameter)20 SimulationPaneBuilder (aima.gui.fx.framework.SimulationPaneBuilder)10 BorderPane (javafx.scene.layout.BorderPane)10 StackPane (javafx.scene.layout.StackPane)8 FunctionPlotterCtrl (aima.gui.fx.views.FunctionPlotterCtrl)2 NQueensViewCtrl (aima.gui.fx.views.NQueensViewCtrl)2 MapPaneCtrl (aimax.osm.gui.fx.viewer.MapPaneCtrl)2 Canvas (javafx.scene.canvas.Canvas)2 EightPuzzleViewCtrl (aima.gui.fx.views.EightPuzzleViewCtrl)1 MapEnvironmentViewCtrl (aima.gui.fx.views.MapEnvironmentViewCtrl)1 SimpleEnvironmentViewCtrl (aima.gui.fx.views.SimpleEnvironmentViewCtrl)1 VacuumEnvironmentViewCtrl (aima.gui.fx.views.VacuumEnvironmentViewCtrl)1