File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/ReinforcementLearningCore/src/core Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ export ResetAtTerminal, ResetAfterNSteps
3
3
"""
4
4
ResetAtTerminal()
5
5
6
- A reset condition that resets if is_terminated(env) is true.
6
+ A reset condition that resets the environemnt if is_terminated(env) is true.
7
7
"""
8
8
struct ResetAtTerminal end
9
9
@@ -12,7 +12,7 @@ struct ResetAtTerminal end
12
12
"""
13
13
ResetAfterNSteps(n)
14
14
15
- A reset condition that resets after `n` steps in the environment .
15
+ A reset condition that resets the environment after `n` steps.
16
16
"""
17
17
mutable struct ResetAfterNSteps
18
18
t:: Int
22
22
ResetAfterNSteps (n:: Int ) = ResetAfterNSteps (0 , n)
23
23
24
24
function (r:: ResetAfterNSteps )(policy, env)
25
- r. t += 1
26
25
stop = r. t >= r. n
26
+ r. t += 1
27
27
if stop
28
28
r. t = 0
29
29
return true
You can’t perform that action at this time.
0 commit comments