active-inference-robotics
БесплатноБез исполняемых скриптовНе проверенSecond-order skill synthesizing Patrick Kenny's discrete active inference framework with K-Scale's JAX/MuJoCo robotics stack for predictive coding in robot…
от plurigrid★ 73 звезды на GitHubОб этом скилле
Active Inference Robotics Skill (Second-Order)
"The agent's job is to predict its actions by predicting its sensations." — Patrick Kenny
Trigger Conditions
- User asks about bridging active inference with robot control
- Questions about predictive coding in locomotion policies
- Connecting KL divergence minimization to RL training
- Mean field approximation in robotics state estimation
- Sim2Real as inference about future observations
Overview
Second-order skill synthesizing Patrick Kenny's discrete active inference framework with K-Scale's JAX/MuJoCo robotics stack. This skill emerges from the constructive collision between:
- Active Inference Institute (ActInf ModelStream 019.1, Jan 2025)
- K-Scale Labs (ksim, kos, kinfer ecosystem)
- MuJoCo Playground (DeepMind's sim2real framework)
The Constructive Collision
┌─────────────────────────────────────────────────────────────────────────────┐
│ CONSTRUCTIVE COLLISION: Two Threads Converging │
│ │
│ Thread A: Patrick Kenny (Nov 2025) │
│ ════════════════════════════════════ │
│ "Active inference can be formulated as constrained KL divergence │
│ minimization solved by standard mean field methods" │
│ │
│ Key insight: Expected Free Energy ≈ KL Divergence + Entropy Regularizer │
│ │
│ Thread B: K-Scale Labs (2024-2025) │
│ ═══════════════════════════════════ │
│ "RL-based closed-loop control using policies trained in simulation │
│ has firmly won as the best way of achieving real-time control" │
│ │
│ Key insight: Stateless vs Stateful behaviors as pure/coalgebraic semantics │
│ │
│ COLLISION POINT: Both minimize surprise about future observations │
│ ══════════════════════════════════════════════════════════════════ │
│ │
│ Active Inference Robotics RL │
│ ──────────────── ────────── │
│ Predictive Distribution ←→ Policy π(a|s) │
│ Hidden Markov Model ←→ MDP/POMDP │
│ Mean Field Updates ←→ PPO Gradient Steps │
│ Variational Free Energy ←→ Policy Loss │
│ Expected Free Energy ←→ Value Function + Entropy │
│ Perception/Action Loop ←→ Observation/Action Loop │
│ │
└─────────────────────────────────────────────────────────────────────────────┘
Kenny's Key Contribution
From arXiv:2511.20321:
Perception/Action Divergence = VFE(past) + KL(future states)
Where:
- VFE(past) = Standard variational free energy on observed history
- KL(future) = Divergence of predictive distribution from HMM
This differs from Expected Free Energy by an ENTROPY REGULARIZER:
EFE ≈ Pragmatic Value + Mutual Information
PAD ≈ Pragmatic Value + Entropy(Q)
Why Entropy Regularization Matters for Robotics
# In ksim PPO training, entropy bonus prevents policy collapse:
loss = policy_loss + value_loss - entropy_coef * entropy
# Kenny's formulation shows this is NOT ad-hoc but principled:
# Entropy regularizer = not being overconfident about predictions
# Biological rationale: know limitations of future predictions
Mapping to ksim Architecture
| Active Inference Concept | ksim Implementation |
|---|---|
| Hidden Markov Model | PhysicsEngine (MJX/MuJoCo) |
| Observation distribution | Observation.observe(state) |
| State inference Q(s) | Critic.forward(obs, carry) |
| Action inference Q(a) | Actor.forward(obs, carry) |
| Mean field factorization | Independent Q(s_t) per timestep |
| Predictive distribution | Policy rollout trajectory |
| VFE minimization | PPO policy gradient |
| EFE/PAD minimization | Value function + entropy bonus |
Second-Order Behavior Types
1. Reflexive Control (Kenny's "Sufficient" Model)
# Agent predicts proprioceptive sensations → fulfills reflexively
class ReflexiveController:
"""
Kenny: "If the agent can successfully predict its future sensations,
it can fulfill t
Установить active-inference-robotics в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл active-inference-robotics?
Second-order skill synthesizing Patrick Kenny's discrete active inference framework with K-Scale's JAX/MuJoCo robotics stack for predictive coding in robot locomotion
Как установить скилл active-inference-robotics?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл active-inference-robotics запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic