env_action_space_sample: Sample an action from the environments's action space.

Description Usage Arguments Value Examples

Description

Sample an action from the environments's action space.

Usage

1
env_action_space_sample(x, instance_id)

Arguments

x

An instance of class "GymClient"; this object has "remote_base" as an attribute.

instance_id

A short identifier (such as "3c657dbc") for the environment instance.

Value

An action sampled from a space (such as "Discrete"), which varies from space to space.

Examples

1
2
3
4
5
6
7
8
## Not run: 
remote_base <- "http://127.0.0.1:5000"
client <- create_GymClient(remote_base)
env_id <- "CartPole-v0"
instance_id <- env_create(client, env_id)
env_action_space_sample(client, instance_id)

## End(Not run)

gym documentation built on May 1, 2019, 9:26 p.m.