界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

linear_reward_successor_features

linear_reward_successor_features

【效率与协作】Compute linear multitask rewards, successor-feature values, and vector Bellman targets for USFA-style reinforcement-learning tasks.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: linear_reward_successor_features description: Compute linear multitask rewards, successor-feature values, and vector Bellman targets for USFA-style reinforcement-learning tasks.

Linear Reward Successor Features

Use this skill when a recovery or implementation needs the Universal Successor Features contract r_w = phi^T w and Q = psi^T w. Do not use it to choose candidate GPI policies; that belongs to the GPI action-selection skill.

Inputs

  • phi: transition feature vector.
  • w: task reward-weight vector.
  • psi: successor-feature vector for (state, action, z).
  • next_psi: bootstrap successor-feature vector, or zeros for terminal transitions.
  • gamma: discount factor.

Outputs

  • Scalar linear reward.
  • Scalar Q value.
  • Vector Bellman target.
  • Vector TD error.

Workflow

  1. Validate equal vector dimensions.
  2. Compute reward = dot(phi, w).
  3. Compute q_value = dot(psi, w).
  4. Compute target = phi + gamma * next_psi unless terminal.
  5. Compute td_error = target - psi.

Validation

Run:

python tests/test_successor_features.py

Limitations

This skill assumes observable transition features and linear rewards. It does not learn features from pixels or choose behavior policies.

我的收藏