Skip to content

Commit 937cae1

Browse files
committed
move increment
1 parent a168774 commit 937cae1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ReinforcementLearningCore/src/core/reset_conditions.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ export ResetAtTerminal, ResetAfterNSteps
33
"""
44
ResetAtTerminal()
55
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.
77
"""
88
struct ResetAtTerminal end
99

@@ -12,7 +12,7 @@ struct ResetAtTerminal end
1212
"""
1313
ResetAfterNSteps(n)
1414
15-
A reset condition that resets after `n` steps in the environment.
15+
A reset condition that resets the environment after `n` steps.
1616
"""
1717
mutable struct ResetAfterNSteps
1818
t::Int
@@ -22,8 +22,8 @@ end
2222
ResetAfterNSteps(n::Int) = ResetAfterNSteps(0, n)
2323

2424
function (r::ResetAfterNSteps)(policy, env)
25-
r.t += 1
2625
stop = r.t >= r.n
26+
r.t += 1
2727
if stop
2828
r.t = 0
2929
return true

0 commit comments

Comments
 (0)