Search in sources :

Example 11 with Parameter

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

the class OsmLRTAStarAgentApp method createParameters.

protected List<Parameter> createParameters() {
    Parameter p1 = new Parameter(PARAM_WAY_SELECTION, "Use any way", "Travel by car", "Travel by bicycle");
    Parameter p2 = new Parameter(PARAM_HEURISTIC, "0", "SLD");
    p2.setDefaultValueIndex(1);
    return Arrays.asList(p1, p2);
}
Also used : Parameter(aima.gui.fx.framework.Parameter)

Example 12 with Parameter

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

the class OsmAgentBaseApp method createParameters.

/** Defines the parameters to be shown in the simulation pane tool bar. */
protected List<Parameter> createParameters() {
    Parameter p1 = new Parameter(PARAM_WAY_SELECTION, "Use any way", "Travel by car", "Travel by bicycle");
    Parameter p2 = new Parameter(PARAM_SEARCH, (Object[]) SearchFactory.getInstance().getSearchStrategyNames());
    p2.setDefaultValueIndex(5);
    Parameter p3 = new Parameter(PARAM_Q_SEARCH_IMPL, (Object[]) SearchFactory.getInstance().getQSearchImplNames());
    p3.setDefaultValueIndex(1);
    p3.setDependency(PARAM_SEARCH, "Depth First", "Breadth First", "Uniform Cost", "Greedy Best First", "A*");
    Parameter p4 = new Parameter(PARAM_HEURISTIC, "0", "SLD");
    p4.setDefaultValueIndex(1);
    p4.setDependency(PARAM_SEARCH, "Greedy Best First", "A*", "Recursive Best First", "Recursive Best First No Loops", "Hill Climbing");
    return Arrays.asList(p1, p2, p3, p4);
}
Also used : Parameter(aima.gui.fx.framework.Parameter)

Example 13 with Parameter

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

the class NQueensCspApp method createParameters.

protected List<Parameter> createParameters() {
    Parameter p1 = new Parameter(PARAM_STRATEGY, "Backtracking", "Min-Conflicts");
    Parameter p2 = new Parameter(PARAM_VAR_SELECT, "Default", "MRV", "DEG", "MRV&DEG");
    Parameter p3 = new Parameter(PARAM_VAL_SELECT, "Default", "LCV");
    Parameter p4 = new Parameter(PARAM_INFERENCE, "None", "Forward Checking", "AC3");
    p2.setDependency(PARAM_STRATEGY, "Backtracking");
    p3.setDependency(PARAM_STRATEGY, "Backtracking");
    p4.setDependency(PARAM_STRATEGY, "Backtracking");
    Parameter p5 = new Parameter(PARAM_BOARD_SIZE, 4, 8, 16, 32, 64);
    p5.setDefaultValueIndex(1);
    return Arrays.asList(p1, p2, p3, p4, p5);
}
Also used : Parameter(aima.gui.fx.framework.Parameter)

Example 14 with Parameter

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

the class NQueensSearchApp 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 NQueensViewCtrl(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);
    simPaneCtrl.setParam(SimulationPaneCtrl.PARAM_SIM_SPEED, 1);
    return root;
}
Also used : BorderPane(javafx.scene.layout.BorderPane) SimulationPaneBuilder(aima.gui.fx.framework.SimulationPaneBuilder) NQueensViewCtrl(aima.gui.fx.views.NQueensViewCtrl) Parameter(aima.gui.fx.framework.Parameter) StackPane(javafx.scene.layout.StackPane)

Example 15 with Parameter

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

the class RouteFindingAgentApp 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 MapEnvironmentViewCtrl(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 : BorderPane(javafx.scene.layout.BorderPane) SimulationPaneBuilder(aima.gui.fx.framework.SimulationPaneBuilder) Parameter(aima.gui.fx.framework.Parameter) MapEnvironmentViewCtrl(aima.gui.fx.views.MapEnvironmentViewCtrl) StackPane(javafx.scene.layout.StackPane)

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