View source on GitHub
|
A tuple that represents a trajectory.
tf_agents.trajectories.Trajectory(
step_type,
observation,
action,
policy_info,
next_step_type,
reward,
discount
)
Used in the notebooks
| Used in the tutorials |
|---|
A Trajectory represents a sequence of aligned time steps. It captures the
observation, step_type from current time step with the computed action
and policy_info. Discount, reward and next_step_type come from the next
time step.
Methods
is_boundary
is_boundary() -> tf_agents.typing.types.Bool
is_first
is_first() -> tf_agents.typing.types.Bool
is_last
is_last() -> tf_agents.typing.types.Bool
is_mid
is_mid() -> tf_agents.typing.types.Bool
replace
replace(
**kwargs
) -> 'Trajectory'
Exposes as namedtuple._replace.
Usage:
new_trajectory = trajectory.replace(policy_info=())
This returns a new trajectory with an empty policy_info.
| Args | |
|---|---|
**kwargs
|
key/value pairs of fields in the trajectory. |
| Returns | |
|---|---|
A new Trajectory.
|
View source on GitHub