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);
}
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;
}
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;
}
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);
}
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);
}
Aggregations