add-reward

Implement and register reward functions in the AReaL reinforcement learning framework.

5.7k|573|Updated Feb 24, 2025
One-click install
npx skills add https://github.com/inclusionAI/AReaL --skill add-reward
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-reward
Source: https://github.com/inclusionAI/AReaL/tree/main/.claude/skills/add-reward
Command: npx skills add https://github.com/inclusionAI/AReaL --skill add-reward

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides developers through implementing and integrating new reward functions into the AReaL reinforcement learning framework. It covers file structure, registration, testing, and best practices to ensure deterministic, non-blocking rewards.

Core Features & Use Cases

  • Create new reward modules in areal/reward/<name>.py.
  • Register the reward function in areal.reward.init so it can be selected by name.
  • Test rewards locally with small, deterministic examples to ensure consistent behavior.

Quick Start

Start by drafting a new reward function following the template in areal/reward and registering it in areal.reward.init.

Frequently Asked Questions about add-reward

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

FAQPage Schema
How do I add a custom reward function to the AReaL reinforcement learning framework?

To add a custom reward function in AReaL, create a new reward module in the areal/reward/ directory and register it in areal.reward.__init__ so it can be selected by name within the workflow.

What are the requirements for Python reward functions in AReaL?

Python reward functions in AReaL must adhere to deterministic, non-blocking execution and logging requirements. Standard Python proficiency is assumed to implement and validate these modules correctly.

How do I test custom rewards in AReaL to ensure consistent behavior?

Test rewards locally in AReaL using small, deterministic examples to ensure consistent behavior. This validation step confirms the reward function operates correctly within the workflow.

Why do I need to register reward modules in the AReaL __init__ file?

Registering reward modules in areal.reward.__init__ is required so the custom function can be selected and invoked by name during the reinforcement learning workflow operations.

Can I use non-deterministic operations when creating AReaL reward modules?

No, AReaL reward modules must adhere to deterministic, non-blocking execution and logging requirements to ensure consistent behavior during reinforcement learning training.