Skip to content

Instantly share code, notes, and snippets.

@tristansokol
Created April 8, 2018 15:43
Show Gist options
  • Save tristansokol/d7384e762f3376dc3588b272632bb70b to your computer and use it in GitHub Desktop.
Save tristansokol/d7384e762f3376dc3588b272632bb70b to your computer and use it in GitHub Desktop.
def move(env, num_steps, left=False, jump_prob=1.0 / 10.0, jump_repeat=4):
"""
Move right or left for a certain number of steps,
jumping periodically.
"""
_, rew, done, _ = env.step(action)
total_rew += rew
steps_taken += 1
return total_rew, done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment