reward-shaping-engineering

Design reward functions that preserve optimal policies in reinforcement learning.

1|Updated Oct 29, 2025
One-click install
npx skills add https://github.com/tachyon-beep/hamlet --skill reward-shaping-engineering
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reward-shaping-engineering
Source: https://github.com/tachyon-beep/hamlet/tree/main/.claude/skills/yzmir-deep-rl/skills/reward-shaping-engineering
Command: npx skills add https://github.com/tachyon-beep/hamlet --skill reward-shaping-engineering

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured framework for designing reward functions in reinforcement learning that preserve the optimal policy while accelerating training and reducing reward hacking.

Core Features & Use Cases

  • Potential-based shaping that preserves policy
  • Anti-hacking penalties and robust validation workflows
  • Guidance on sparse vs dense rewards, normalization, and clipping
  • Inverse RL considerations and distribution-shift testing

Quick Start

Implement a potential-based shaping function and combine it with the main task reward, then run validation tests across environment variants to ensure policy preservation and improved learning speed.

Frequently Asked Questions about reward-shaping-engineering

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design reward functions for reinforcement learning without changing the optimal policy?

To design reward functions that preserve optimal policies, apply potential-based shaping by combining a potential function with the main task reward. This accelerates learning while mathematically guaranteeing the original optimal policy remains unchanged.

What is the best way to prevent reward hacking in reinforcement learning environments?

Preventing reward hacking involves integrating anti-hacking penalties into the reward design and running robust validation workflows. Testing under distribution shifts across environment variants ensures the agent learns safely without exploiting reward loopholes.

When should I use sparse versus dense rewards in reinforcement learning training?

Use sparse rewards to guarantee policy purity or dense rewards to accelerate training. This skill provides structured guidance on sparse versus dense reward strategies, including reward normalization and clipping to stabilize learning updates.

How do I validate reward functions under distribution shifts in robotics and games?

Validate reward functions under distribution shifts by running robust evaluation workflows across environment variants in robotics, simulations, and games. This tests policy preservation and confirms learning improvements despite environmental changes.

Does potential-based shaping work with inverse reinforcement learning?

Yes, potential-based shaping works alongside inverse reinforcement learning considerations. The framework supports integrating shaping techniques while accounting for inverse reward design to safely accelerate training without altering optimal behaviors.