Decision Transformer; Transformer for RL partially ditching dynamic programming
mchromiak.github.io
mchromiak.github.io
In language modeling, you want to learn, for example, the next word in a sentence. Given a sequence of tokens t₀, t₁, t₂, predict t₃.
The authors here model RL as a similar autoregressive task, where we want to predict which action to take, given a sequence of previous actions, states, and "rewards-to-go", or the estimated remaining rewards in the trajectory. For example, given (s₀, a₀, R₀), (s₁, R₁), we want to predict the best a₁.
This allows us to train in a supervised way by accumulating trajectories from either training data or random walks.
Then, at inference time, all we do is input into the model (a) the start state s₀, and (b) the desired "rewards-to-go" R₀ we'd like to have.
The output at the next step is an action a₀. We then calculate the next state s₁ caused by taking a₀, and the remaining rewards-to-go R₁, to find the best a₁. We can repeat this with partial trajectories until the rewards-to-go hit 0, or until the trajectory is complete.
kudos to the authors