use of aima.core.learning.reinforcement.agent.QLearningAgent in project aima-java by aimacode.
the class LearningDemo method qLearningAgentDemo.
public static void qLearningAgentDemo() {
System.out.println("======================");
System.out.println("DEMO: Q-Learning-Agent");
System.out.println("======================");
CellWorld<Double> cw = CellWorldFactory.createCellWorldForFig17_1();
CellWorldEnvironment cwe = new CellWorldEnvironment(cw.getCellAt(1, 1), cw.getCells(), MDPFactory.createTransitionProbabilityFunctionForFigure17_1(cw), new JavaRandomizer());
QLearningAgent<Cell<Double>, CellWorldAction> qla = new QLearningAgent<Cell<Double>, CellWorldAction>(MDPFactory.createActionsFunctionForFigure17_1(cw), CellWorldAction.None, 0.2, 1.0, 5, 2.0);
cwe.addAgent(qla);
output_utility_learning_rates(qla, 20, 10000, 500, 20);
System.out.println("=========================");
}
Aggregations