Random Agent¶
-
class
tensorforce.agents.
RandomAgent
(states, actions, max_episode_timesteps=None, name='agent', device=None, summarizer=None, seed=None, recorder=None)[source]¶ Agent returning random action values (specification key:
random
).Parameters: - states (specification) – States specification (required), arbitrarily nested
dictionary of state descriptions (usually taken from
Environment.states()
) with the following attributes:- type ('bool' | 'int' | 'float') – state data type (default: 'float').
- shape (int | iter[int]) – state shape (required).
- num_states (int > 0) – number of discrete state values (required for type 'int').
- min_value/max_value (float) – minimum/maximum state value (optional for type 'float').
- actions (specification) – Actions specification (required), arbitrarily nested
dictionary of action descriptions (usually taken from
Environment.actions()
) with the following attributes:- type ('bool' | 'int' | 'float') – action data type (required).
- shape (int > 0 | iter[int > 0]) – action shape (default: ()).
- num_actions (int > 0) – number of discrete action values (required for type 'int').
- min_value/max_value (float) – minimum/maximum action value (optional for type 'float').
- max_episode_timesteps (int > 0) –
?
- seed (int) – Random seed to set for Python, NumPy and TensorFlow (default: none).
- name (string) – Agent name, used e.g. for TensorFlow scopes (default: “agent”).
- device (string) – Device name (default: TensorFlow default).
- summarizer (specification) – TensorBoard summarizer configuration with the following
attributes
(default: no summarizer):
- directory (path) – summarizer directory (required).
- steps (int > 0, dict[int > 0]) – how frequently to record summaries, applies to "variables" and "act" if specified globally (default: always), otherwise specified per "variables"/"act" in timesteps and "observe"/"update" in updates (default: never).
- flush (int > 0) – how frequently in seconds to flush the summary writer (default: 10).
- labels ("all" | iter[string]) – all or list of summaries to record, from the following labels (default: only "graph"):
- "graph": graph summary
- "parameters": parameter scalars
- states (specification) – States specification (required), arbitrarily nested
dictionary of state descriptions (usually taken from