Skip to content

Instantly share code, notes, and snippets.

@awjuliani
Last active November 13, 2016 00:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save awjuliani/21407fd82f3ad1f63934c42a7e91091b to your computer and use it in GitHub Desktop.
Save awjuliani/21407fd82f3ad1f63934c42a7e91091b to your computer and use it in GitHub Desktop.
#Assuming we are using OpenAI gym environment.
action = env.action_space.sample()
#Otherwise:
#total_actions = ??
action = np.random.randint(0,total_actions)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment