Skip to content

Commit afa4b87

Browse files
authored
Merge pull request #61 from k223kim/k223kim/fix-training-sumo-rl-env
fix: training loop example for sumo rl
2 parents 2387696 + 9c90de5 commit afa4b87

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/sumo_rl_simple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def main():
5656
action_id = np.random.choice(result.observation.action_mask)
5757

5858
# Take action
59-
result = env.step(SumoAction(phase_id=action_id))
59+
result = env.step(SumoAction(phase_id=int(action_id)))
6060

6161
episode_reward += result.reward or 0
6262
steps += 1

src/envs/sumo_rl_env/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ for episode in range(10):
220220
action_id = np.random.choice(result.observation.action_mask)
221221

222222
# Take action
223-
result = env.step(SumoAction(phase_id=action_id))
223+
result = env.step(SumoAction(phase_id=int(action_id)))
224224

225225
episode_reward += result.reward or 0
226226
steps += 1

0 commit comments

Comments
 (0)