Experiments
Class Sequencer
java.lang.Object
|
+--Experiments.Sequencer
- class Sequencer
- extends java.lang.Object
The sequencer lets alternatively the environment and the agent compute their
new outputs. It works as the following :
1 - The environment computes its first outputs and given reward
2a - The agent (RuleBasedSystem) gets the outputs and reward and learns what it
can
2b - The agent acts (i.e? sets its own output)
2c - The environments computes its new output and reward according to the
action computed by the agent
2d - Go to 2a until the agent is allowed to act
3 - Perform last step
NB : 2* is a step as we defined it. The agent perceives at once perceptions and
reward, and then learns and acts.
- Author:
- Olivier Sigaud and Pierre Gérard.
Constructor Summary |
(package private) |
Sequencer(Environments.Environment env,
MACS.RuleBasedSystem syst)
private double initEpsilonGreedy; |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NB_SIMUS_PER_ENV
private final short NB_SIMUS_PER_ENV
- See Also:
- Constant Field Values
environmentChanged
private boolean environmentChanged
nbFailures
private int nbFailures
knowledge
private double knowledge
environment
private Environments.Environment environment
system
private static MACS.RuleBasedSystem system
controlRules
private MACS.ClassifierSystem controlRules
reportFile
private java.io.FileWriter reportFile
reportsManager
private Experiments.ReportsManager reportsManager
Sequencer
Sequencer(Environments.Environment env,
MACS.RuleBasedSystem syst)
- private double initEpsilonGreedy;
- Parameters:
env
- syst
-
getRuleBasedSystem
protected MACS.RuleBasedSystem getRuleBasedSystem()
- Returns:
- Experiments.RuleBasedSystem
getEnvironment
public Environments.Environment getEnvironment()
- Returns:
- Environments.Environment
takeStep
protected void takeStep(int step,
int globalstep)
- Parameters:
step
-
runTrial
protected int runTrial(int nbSteps)
- Parameters:
nbSteps
-
- Returns:
- int
runSimulation
private void runSimulation(int nbSteps)
- Parameters:
nbSteps
-
runSimulation
private void runSimulation(int nbTrials,
int nbSteps)
- Parameters:
nbTrials
- nbSteps
-
changeEnvironment
private void changeEnvironment(short noSimu)
- Parameters:
noSimu
-
environmentJustChanged
protected boolean environmentJustChanged()
- Returns:
- boolean
run
public void run(int nbSimulations,
int nbTrials,
int nbSteps)
- Parameters:
nbSimulations
- nbTrials
- nbSteps
-
run
public void run(int nbSimulations,
int nbSteps)
- Parameters:
nbSimulations
- nbSteps
-
getKnowledgePercentage
protected double getKnowledgePercentage()
- Returns:
- double
checkForKnowledgePercentage
protected void checkForKnowledgePercentage(int step)
- Parameters:
step
-