@Test public void when_preEpisodeCalled_expect_experienceHandlerReset() { int trainingSteps = 100; for (int i = 0; i < trainingSteps; i++) { asyncThreadDiscrete.getExperienceHandler().addExperience(mockObservation, 0, 0.0, false); } int experienceHandlerSizeBeforeReset = asyncThreadDiscrete.getExperienceHandler().getTrainingBatchSize(); asyncThreadDiscrete.preEpisode(); assertEquals(100, experienceHandlerSizeBeforeReset); assertEquals(0, asyncThreadDiscrete.getExperienceHandler().getTrainingBatchSize()); }
@Override protected void preEpisode() { experienceHandler.reset(); }
AsyncThreadDiscrete extends AsyncThread<OBSERVATION, Integer, DiscreteSpace, NN> { @Override protected void preEpisode() { experienceHandler.reset(); } }
AsyncThreadDiscrete extends AsyncThread<OBSERVATION, Integer, DiscreteSpace, NN> { @Override protected void preEpisode() { experienceHandler.reset(); } AsyncThreadDiscrete(IAsyncGlobal<NN> asyncGlobal,
                               MDP<OBSERVATION, Integer, DiscreteSpace> mdp,
                               TrainingListenerList listeners,
                               int threadNumber,
                               int deviceNum); }
AsyncThreadDiscrete extends AsyncThread<OBSERVATION, Integer, DiscreteSpace, NN> { @Override protected void preEpisode() { experienceHandler.reset(); } AsyncThreadDiscrete(IAsyncGlobal<NN> asyncGlobal,
                               MDP<OBSERVATION, Integer, DiscreteSpace> mdp,
                               TrainingListenerList listeners,
                               int threadNumber,
                               int deviceNum); @Override void setHistoryProcessor(IHistoryProcessor historyProcessor); SubEpochReturn trainSubEpoch(Observation sObs, int trainingSteps); }
AsyncThreadDiscrete extends AsyncThread<OBSERVATION, Integer, DiscreteSpace, NN> { @Override protected void preEpisode() { experienceHandler.reset(); } AsyncThreadDiscrete(IAsyncGlobal<NN> asyncGlobal,
                               MDP<OBSERVATION, Integer, DiscreteSpace> mdp,
                               TrainingListenerList listeners,
                               int threadNumber,
                               int deviceNum); @Override void setHistoryProcessor(IHistoryProcessor historyProcessor); SubEpochReturn trainSubEpoch(Observation sObs, int trainingSteps);  }