Skip to content

Instantly share code, notes, and snippets.

@r007
Created February 10, 2020 15:10
Show Gist options
  • Save r007/b66b49ae0958b0c9b3e98b7e9195b486 to your computer and use it in GitHub Desktop.
Save r007/b66b49ae0958b0c9b3e98b7e9195b486 to your computer and use it in GitHub Desktop.
def reward_function(params):
if params["all_wheels_on_track"] and params["steps"] > 0:
reward = ((params["progress"] / params["steps"]) * 100) + (params["speed"]**2)
else:
reward = 0.01
return float(reward)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment