Skip to content

Commit

Permalink
generate the right number of dmeos
Browse files Browse the repository at this point in the history
  • Loading branch information
rizar committed Feb 1, 2019
1 parent 69ea2b3 commit 7778825
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/make_agent_demos.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,16 @@ def generate_demos(n_episodes, valid, seed, shift=0):
checkpoint_time = time.time()

just_crashed = False
for i in range(n_episodes):
# Run the expert for one episode
while True:
if len(demos) == n_episodes:
break

done = False
if just_crashed:
logger.info("reset the environment to find a mission that the bot can solve")
env.reset()
else:
env.seed(seed + i)
env.seed(seed + len(demos))
obs = env.reset()
agent.on_reset()

Expand Down

0 comments on commit 7778825

Please sign in to comment.