smilesun / rlR

Deep Reinforcement Learning in R (Deep Q Learning, Policy Gradient, Actor-Critic Method, etc)
https://smilesun.github.io/rlR
Other
26 stars 4 forks source link

Logging objects #24

Closed ja-thomas closed 5 years ago

ja-thomas commented 6 years ago

If I understand the basic example correctly agent$learn(300) returns a <Performance> object of the first 300 episodes.

But why is this only the return value and not kept as a log of the agent class?

I would expect something like:

agent$learn(300) # returns nothing
perf = agent$GetPerformance() # returns performance object
perf$plot() 
SebGGruber commented 6 years ago

I agree with this issue. The current implementation only makes sense if you want to explicitly focus on the performance of a new 'learn' session that continues an old one, for example: perf = agent$learn(300) perf_2 = agent$learn(300) Then 'perf_2' may not hold any information of 'perf'. (Both plots hold 300 iterations and add themselves up to the 'big picture')

But currently 'perf_2' extends 'perf' with the new learning information (holding 600 iterations), making 'perf' obsolete.

smilesun commented 5 years ago

now the API is changed to

agent$learn(300) # returns nothing
perf$plotPerf()