JuliaReinforcementLearning / ReinforcementLearningTrajectories.jl

A generalized experience replay buffer for reinforcement learning
MIT License
8 stars 8 forks source link

add Episode Controller #40

Closed HenriDeh closed 1 year ago

HenriDeh commented 1 year ago

I made this EpisodeController, it's like InsertSample but it increments only when a terminal state is inserted. To achieve this I had to change the internals in a way that allows the controller to access the pushed elements to check the terminal flags.

Caveat: this only works with environments that do have a terminal state, meaning that it cannot be used with other reset_conditions than ResetAtTerminal.

HenriDeh commented 1 year ago

Also, I found a bug at commit 60b86e3 It wasn't a bug, it's just that append appends Traces and not a NamedTuple. Kind off inconsistent but not an issue in itself.

codecov[bot] commented 1 year ago

Codecov Report

Merging #40 (8f4248f) into main (cb74a59) will increase coverage by 0.48%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #40      +/-   ##
==========================================
+ Coverage   69.25%   69.73%   +0.48%     
==========================================
  Files          13       13              
  Lines         566      575       +9     
==========================================
+ Hits          392      401       +9     
  Misses        174      174              
Impacted Files Coverage Δ
src/controllers.jl 100.00% <100.00%> (ø)
src/trajectory.jl 72.22% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more