@@ -109,34 +109,34 @@ function Base.run(
109109 is_stop = false
110110 while ! is_stop
111111 # 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)
116116
117117 while ! (reset_condition (multiagent_policy, env) || is_stop) # one episode
118118 for player in CurrentPlayerIterator (env)
119119 policy = multiagent_policy[player] # Select appropriate policy
120120 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)
124124
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)
127127
128128
129129
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)
133133
134134 if check_stop (stop_condition, policy, env)
135135 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
140140 break
141141 end
142142
@@ -146,9 +146,9 @@ function Base.run(
146146 end
147147 end # end of an episode
148148
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)
152152 end
153153 push! (multiagent_policy, PostExperimentStage (), env)
154154 push! (multiagent_hook, PostExperimentStage (), multiagent_policy, env)
0 commit comments