Traj: Trajectory Object

Description Usage Arguments Details Value Examples

View source: R/base.R

Description

The function Traj() creates a trajectory object for discrete-time RL data.

Usage

1
Traj(observations, actions)

Arguments

observations

a list for observations, the number of elements should be one more than that of actions.

actions

a list for actions, each element for each time step.

Details

The trajectory object is designed to represent typical RL trajectory data:

O_1, A_1, O_2, A_2, …, O_n, A_n, O_{n+1}

This representation is compatible with many RL data generator (for example the data structure of OpenAI Gym library). With user-defined interpreter, observations and actions (or their history) can be encoded/converted to states, rewards and actions under Markov Decision Process (MDP) framework.

Value

a trajectory object (class = "Traj")

Examples

1
2
3
4
observations <- list(0, -1, -1, 0, 1, 1)
actions <- list(-1, 1, 1, 0, -1)
tj <- Traj(observations, actions)
tj

XiaoqiLu/PhD-Thesis documentation built on March 1, 2021, 10:49 a.m.