-
Notifications
You must be signed in to change notification settings - Fork 161
Open
Description
If you run the experimentAndPlotter function from
burlap_examples/src/main/java/edu/brown/cs/burlap/tutorials/BasicBehavior.java
and change the TrialMode from MOST_RECENT_AND_AVERAGE to TRIAL_AVERAGES_ONLY (line 261)
exp.setUpPlottingConfiguration(500, 250, 2, 1000,
TrialMode.TRIAL_AVERAGES_ONLY,
PerformanceMetric.CUMULATIVE_STEPS_PER_EPISODE,
PerformanceMetric.AVERAGE_EPISODE_REWARD);The Program get stucked.
I think this is because PerformancePlotter only notifies that one trial is complete if the Trial Mode is MOST_RECENT_TRIAL_ONLY or MOST_RECENT_AND_AVERAGE. This can be found in the updateTimeSeries function of the PerformancePlotter class (line 753).
So maybe this function should look like this?
synchronized protected void updateTimeSeries(){
SwingUtilities.invokeLater(new Runnable() {
public void run() {
synchronized (WorkingPerformancePlotter.this) {
synchronized (WorkingPerformancePlotter.this.trialUpdateComplete) {
if(WorkingPerformancePlotter.this.trialMode.mostRecentTrialEnabled()){
if(WorkingPerformancePlotter.this.needsClearing){
WorkingPerformancePlotter.this.curAgentDatasets.clearNonAverages();
WorkingPerformancePlotter.this.needsClearing = false;
}
if(WorkingPerformancePlotter.this.curTimeStep > WorkingPerformancePlotter.this.lastTimeStepUpdate){
WorkingPerformancePlotter.this.updateCSRSeries();
WorkingPerformancePlotter.this.lastTimeStepUpdate = curTimeStep;
}
if(WorkingPerformancePlotter.this.curEpisode > WorkingPerformancePlotter.this.lastEpisode){
WorkingPerformancePlotter.this.updateCERSeries();
WorkingPerformancePlotter.this.updateAERSeris();
WorkingPerformancePlotter.this.updateMERSeris();
WorkingPerformancePlotter.this.updateCSESeries();
WorkingPerformancePlotter.this.updateSESeries();
WorkingPerformancePlotter.this.lastEpisode = WorkingPerformancePlotter.this.curEpisode;
}
}
WorkingPerformancePlotter.this.trialUpdateComplete.b = true;
WorkingPerformancePlotter.this.trialUpdateComplete.notifyAll();
}
}
}
});
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels