@@ -109,34 +109,34 @@ function Base.run(
109
109
is_stop = false
110
110
while ! is_stop
111
111
# NOTE: @timeit_debug statements are for debug logging
112
- @timeit_debug to " reset!" reset! (env)
113
- @timeit_debug to " push!(policy) PreEpisodeStage" push! (multiagent_policy, PreEpisodeStage (), env)
114
- @timeit_debug to " optimise! PreEpisodeStage" optimise! (multiagent_policy, PreEpisodeStage ())
115
- @timeit_debug to " push!(hook) PreEpisodeStage" push! (multiagent_hook, PreEpisodeStage (), multiagent_policy, env)
112
+ @timeit_debug timer " reset!" reset! (env)
113
+ @timeit_debug timer " push!(policy) PreEpisodeStage" push! (multiagent_policy, PreEpisodeStage (), env)
114
+ @timeit_debug timer " optimise! PreEpisodeStage" optimise! (multiagent_policy, PreEpisodeStage ())
115
+ @timeit_debug timer " push!(hook) PreEpisodeStage" push! (multiagent_hook, PreEpisodeStage (), multiagent_policy, env)
116
116
117
117
while ! (reset_condition (multiagent_policy, env) || is_stop) # one episode
118
118
for player in CurrentPlayerIterator (env)
119
119
policy = multiagent_policy[player] # Select appropriate policy
120
120
hook = multiagent_hook[player] # Select appropriate hook
121
- @timeit_debug to " push!(policy) PreActStage" push! (policy, PreActStage (), env)
122
- @timeit_debug to " optimise! PreActStage" optimise! (policy, PreActStage ())
123
- @timeit_debug to " push!(hook) PreActStage" push! (hook, PreActStage (), policy, env)
121
+ @timeit_debug timer " push!(policy) PreActStage" push! (policy, PreActStage (), env)
122
+ @timeit_debug timer " optimise! PreActStage" optimise! (policy, PreActStage ())
123
+ @timeit_debug timer " push!(hook) PreActStage" push! (hook, PreActStage (), policy, env)
124
124
125
- action = @timeit_debug to " plan!" RLBase. plan! (policy, env)
126
- @timeit_debug to " act!" act! (env, action)
125
+ action = @timeit_debug timer " plan!" RLBase. plan! (policy, env)
126
+ @timeit_debug timer " act!" act! (env, action)
127
127
128
128
129
129
130
- @timeit_debug to " push!(policy) PostActStage" push! (policy, PostActStage (), env)
131
- @timeit_debug to " optimise! PostActStage" optimise! (policy, PostActStage ())
132
- @timeit_debug to " push!(hook) PostActStage" push! (hook, PostActStage (), policy, env)
130
+ @timeit_debug timer " push!(policy) PostActStage" push! (policy, PostActStage (), env)
131
+ @timeit_debug timer " optimise! PostActStage" optimise! (policy, PostActStage ())
132
+ @timeit_debug timer " push!(hook) PostActStage" push! (hook, PostActStage (), policy, env)
133
133
134
134
if check_stop (stop_condition, policy, env)
135
135
is_stop = true
136
- @timeit_debug to " push!(policy) PreActStage" push! (multiagent_policy, PreActStage (), env)
137
- @timeit_debug to " optimise! PreActStage" optimise! (multiagent_policy, PreActStage ())
138
- @timeit_debug to " push!(hook) PreActStage" push! (multiagent_hook, PreActStage (), policy, env)
139
- @timeit_debug to " plan!" RLBase. plan! (multiagent_policy, env) # let the policy see the last observation
136
+ @timeit_debug timer " push!(policy) PreActStage" push! (multiagent_policy, PreActStage (), env)
137
+ @timeit_debug timer " optimise! PreActStage" optimise! (multiagent_policy, PreActStage ())
138
+ @timeit_debug timer " push!(hook) PreActStage" push! (multiagent_hook, PreActStage (), policy, env)
139
+ @timeit_debug timer " plan!" RLBase. plan! (multiagent_policy, env) # let the policy see the last observation
140
140
break
141
141
end
142
142
@@ -146,9 +146,9 @@ function Base.run(
146
146
end
147
147
end # end of an episode
148
148
149
- @timeit_debug to " push!(policy) PostEpisodeStage" push! (multiagent_policy, PostEpisodeStage (), env) # let the policy see the last observation
150
- @timeit_debug to " optimise! PostEpisodeStage" optimise! (multiagent_policy, PostEpisodeStage ())
151
- @timeit_debug to " push!(hook) PostEpisodeStage" push! (multiagent_hook, PostEpisodeStage (), multiagent_policy, env)
149
+ @timeit_debug timer " push!(policy) PostEpisodeStage" push! (multiagent_policy, PostEpisodeStage (), env) # let the policy see the last observation
150
+ @timeit_debug timer " optimise! PostEpisodeStage" optimise! (multiagent_policy, PostEpisodeStage ())
151
+ @timeit_debug timer " push!(hook) PostEpisodeStage" push! (multiagent_hook, PostEpisodeStage (), multiagent_policy, env)
152
152
end
153
153
push! (multiagent_policy, PostExperimentStage (), env)
154
154
push! (multiagent_hook, PostExperimentStage (), multiagent_policy, env)
0 commit comments