Search in sources :

Example 16 with Parameter

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

the class EightPuzzleApp method createParameters.

protected List<Parameter> createParameters() {
    Parameter p1 = new Parameter(PARAM_INIT_CONF, "Three Moves", "Medium", "Extreme", "Random");
    Parameter p2 = new Parameter(PARAM_STRATEGY, (Object[]) SEARCH_NAMES.toArray());
    return Arrays.asList(p1, p2);
}
Also used : Parameter(aima.gui.fx.framework.Parameter)

Example 17 with Parameter

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

the class EightPuzzleApp 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 EightPuzzleViewCtrl(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) EightPuzzleViewCtrl(aima.gui.fx.views.EightPuzzleViewCtrl) Parameter(aima.gui.fx.framework.Parameter) StackPane(javafx.scene.layout.StackPane)

Example 18 with Parameter

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

the class SimulatedAnnealingMaximumFinderApp 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_K, 1, 20, 100);
    p2.setDefaultValueIndex(1);
    Parameter p3 = new Parameter(PARAM_LAMBDA, 0.01, 0.05, 0.1, 0.5);
    p3.setDefaultValueIndex(1);
    Parameter p4 = new Parameter(PARAM_MAX_ITER, 100, 500, 1000);
    p4.setDefaultValueIndex(1);
    return Arrays.asList(p1, p2, p3, p4);
}
Also used : Parameter(aima.gui.fx.framework.Parameter)

Example 19 with Parameter

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

the class VacuumAgentApp method createParameters.

protected List<Parameter> createParameters() {
    Parameter p1 = new Parameter(PARAM_ENV, "A/B Deterministic Environment", "A/B Non-Deterministic Environment");
    Parameter p2 = new Parameter(PARAM_AGENT, "TableDrivenVacuumAgent", "ReflexVacuumAgent", "SimpleReflexVacuumAgent", "ModelBasedReflexVacuumAgent", "NondeterministicVacuumAgent");
    return Arrays.asList(p1, p2);
}
Also used : Parameter(aima.gui.fx.framework.Parameter)

Example 20 with Parameter

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

the class OsmAgentBaseApp 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();
    List<Parameter> params = createParameters();
    StackPane mapPane = new StackPane();
    mapPaneCtrl = new MapPaneCtrl(mapPane);
    loadMap();
    StackPane envView = new StackPane();
    envViewCtrl = new SimpleEnvironmentViewCtrl(envView, mapPane, 0.75);
    SimulationPaneBuilder builder = new SimulationPaneBuilder();
    builder.defineParameters(params);
    builder.defineStateView(envView);
    builder.defineInitMethod(this::initialize);
    builder.defineSimMethod(this::simulate);
    simPaneCtrl = builder.getResultFor(root);
    simPaneCtrl.setParam(SimulationPaneCtrl.PARAM_SIM_SPEED, 0);
    return root;
}
Also used : BorderPane(javafx.scene.layout.BorderPane) MapPaneCtrl(aimax.osm.gui.fx.viewer.MapPaneCtrl) SimulationPaneBuilder(aima.gui.fx.framework.SimulationPaneBuilder) Parameter(aima.gui.fx.framework.Parameter) StackPane(javafx.scene.layout.StackPane) SimpleEnvironmentViewCtrl(aima.gui.fx.views.SimpleEnvironmentViewCtrl)

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