# RL jako modelowanie sekwencji (Decision Transformer)

EN: **RL as sequence modelling (Decision Transformer)** · id `decisiontransformer`

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Uczenie ze wzmocnieniem i decyzje](https://aiatlasgraph.com/t/decisions.md) › [Offline RL i eksploracja](https://aiatlasgraph.com/t/offline.md) › RL jako modelowanie sekwencji (Decision Transformer)

## Description

- PL: Traktowanie trajektorii jak tekstu: transformer przewiduje kolejną akcję na podstawie historii i oczekiwanego wyniku.
- EN: Treating trajectories like text: a transformer predicts the next action from history and a desired return.

## In one sentence

- PL: To wybieranie następnego działania z historii wcześniejszych kroków i wskazanego docelowego wyniku.
- EN: This chooses the next action from a history of previous steps and a specified target outcome.

## Problem it solves

- PL: Masz zapisane przebiegi zadań, ale potrzebujesz wykorzystać je do wybierania kolejnych działań przy zadanym celu.
- EN: You have recorded task sequences but need to use them to choose actions for a target outcome.

## What it does

- PL: Uczy się przewidywać kolejny ruch w zapisanych sekwencjach, odczytując dotychczasową sytuację, działania i oczekiwaną pozostałą nagrodę.
- EN: It learns to predict the next move in recorded sequences from situations, previous actions and the desired remaining reward.

## Everyday example

- PL: Program dostaje historię ruchów w grze i oczekiwany wynik, a potem proponuje kolejny ruch podobny do odpowiednich zapisanych przebiegów.
- EN: Software receives a game's action history and desired score, then proposes a next move informed by suitable recorded sequences.

## This concerns you if you…

- PL: masz historie działań wraz z ich wynikami
- PL: chcesz warunkować kolejne wybory oczekiwanym rezultatem
- EN: have action histories with their outcomes
- EN: want future choices conditioned on a desired result

## Keywords

return-to-go · causal transformer · trajectory modeling · return conditioning · sequence prediction

## How it works

- PL: Trajektorię zapisuje się jako sekwencję pożądanego pozostałego zwrotu, stanów i działań. Transformer z maską przyczynową przewiduje akcję warunkowaną historią i zadanym poziomem zwrotu.
- EN: A trajectory is represented as a sequence of desired remaining returns, states and actions. A causally masked transformer predicts actions conditioned on history and a requested return level.

## Limits

- PL: Wysoki zadany zwrot nie gwarantuje jego osiągnięcia. Model zależy od pokrycia trajektorii i może nie uogólniać na cele lub stany niewystępujące w danych.
- EN: Requesting a high return does not guarantee achieving it. The model depends on trajectory coverage and may fail to generalise to unseen goals or states.

## Key terms

- PL: **return-to-go**: Suma nagród pozostałych w trajektorii, używana jako warunek generowania akcji.
- PL: **maska przyczynowa**: Ograniczenie dostępu modelu do przyszłych elementów sekwencji.
- EN: **return-to-go**: Remaining trajectory rewards used to condition action generation.
- EN: **causal mask**: A restriction preventing access to future sequence elements.

## Know first

- [Transformery i attention (Transformers and attention)](https://aiatlasgraph.com/t/transformers.md)
- [Proces decyzyjny Markowa (MDP) (Markov decision processes (MDP))](https://aiatlasgraph.com/t/mdp.md)

## Examples

- PL: Decision Transformer · warunkowanie na docelowej nagrodzie (return-to-go)
- EN: Decision Transformer · return-to-go conditioning

## Related topics

Untyped, symmetric "see also" links.

- [Transformery i attention (Transformers and attention)](https://aiatlasgraph.com/t/transformers.md)

## Sources

- [Decision Transformer: Reinforcement Learning via Sequence Modeling](<https://arxiv.org/abs/2106.01345>) `decision-transformer-2021` · by L. Chen, K. Lu, A. Rajeswaran, K. Lee, A. Grover, M. Laskin, P. Abbeel, A. Srinivas, I. Mordatch

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/decisiontransformer · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
