Sparse-Reward Hindsight Learning Across a Family of Modular Robot Hands

Modular robots can be rebuilt in minutes. A three-fingered hand becomes a two-fingered one, and a short finger becomes a long one. The training signal has not kept pace. Today each new configuration usually gets its own hand-tuned reward: a formula mixing distance to target, joint-velocity penalties and posture terms, re-weighted for each body. This proposal asks whether that per-body reward engineering can be dropped. The replacement is a single controller that knows which body it is driving, trained with only a success/failure signal and hindsight relabeling. Hindsight relabeling is a trick that turns a failed attempt at goal A into a successful example of reaching whatever state the robot actually ended up in.

The new ingredient concerns what the bodies share. Each configuration discovers different reachable object states. We propose to pool those discoveries as goal proposals for every configuration. Each body's own value function then decides whether a proposed goal is realistic for it, and relabeled goals are accepted only if the robot reached them without breaking joint, velocity or current limits. The concrete test bed is a reconfigurable version of the low-cost D'Claw hand, which can be simulated and physically built from swappable servo modules.

Core Claim

A single morphology-conditioned goal-reaching policy can match hand-shaped per-configuration rewards on success rate and cause fewer hardware-limit violations. It needs a sparse reward, hindsight relabeling within each episode, and two gates:

  • Reachability gate: goals achieved by other bodies are shared, but a body only attempts one if its own value estimate says the goal is reachable.
  • Safety gate: a state counts as a relabeled goal only if the path to it was physically safe.

The claim can fail in an informative way. The strongest simple competitor is the same shared policy with ordinary within-episode relabeling and no cross-body goal sharing. If that competitor matches the full method, the goal-sharing mechanism adds nothing, but the result still answers the reward-engineering question.

Where This Sits

The method we reuse. Hindsight Experience Replay showed on a fixed 7-degree-of-freedom Fetch arm that binary rewards plus relabeling solve pushing, sliding and pick-and-place. Hand-shaped distance rewards instead led to bad local optima such as hovering above the puck. That work never varied the body. We keep its "future" relabeling strategy, which picks a goal from later in the same episode. That choice matters here: a state a body actually reached is by construction reachable by that body. The reachability problem only appears once goals are shared across bodies, which is exactly the step we add.

The papers that motivate the gap. RoboMoRe names the "fixed reward trap": one hand-written reward applied to many bodies forces them into the same behavior. Its answer is to have a language model write a dense reward for each body. Our answer is the opposite: remove shaping altogether. ROBEL supplies D'Claw and a benchmark that separates dense training rewards, sparse task scores and hardware-safety counters. It reports that dense-reward policies often succeed by violating joint, velocity and current limits. We adopt its safety counters as both an evaluation metric and the basis for our safety gate.

The papers that supply the architecture. Learning Modular Robot Control Policies represents a robot as a graph of modules and shares network weights across identical modules. That lets one policy run many bodies; it generalized from 12 training designs to 132 unseen ones. It was trained on dense velocity-tracking objectives with model-based learning, not on sparse goals. HyperDistill instead generates a small policy's weights from a description of the body, cutting inference cost 67–160x. It too was distilled from a dense-reward teacher. We use the module-graph design for the actor and the value function, and treat the hypernetwork as an optional deployment-time compression.

The closest cross-body manipulation work. MAIL transfers skills between bodies by describing behavior as object trajectories rather than joint trajectories. It requires teacher demonstrations. We borrow its object-centric view of goals but need no demonstrations.

Work that sets the scale of the problem. LOKI shares policies across clusters of similar bodies to search enormous design spaces, but under standard shaped rewards. We do not tackle design search; our output could later serve as a reward-free evaluator inside it.

Research Program

The robot family. In ROBEL's MuJoCo simulation of D'Claw we build a family of hands by varying:

  • finger count: two, three or four;
  • phalanx count per finger: two or three servos;
  • link length.

About 18 configurations are used for training and 8 are held out, including asymmetric ones. Two tasks come directly from the ROBEL suite, both with goals expressed purely in object or fingertip terms:

  • Turn: the goal is a target valve angle.
  • Pose: the goal is a target fingertip configuration.

The reward is $-1$ per step until the goal is within tolerance, then $0$. There is no shaping.

The learner. An off-policy actor-critic (soft actor-critic) uses module-graph networks conditioned on the body description. The critic is $Q(s,a,g,m)$, a value estimate for state $s$, action $a$, goal $g$ and body $m$. Transitions from all bodies share one replay buffer, tagged with $m$. Relabeling uses the future strategy within each episode. Because action spaces differ, transitions are never transplanted between bodies. What crosses bodies is goals.

The reachability gate. A pooled archive stores object states that any body has achieved. When body $m$ starts an episode, it draws exploration goals from this archive as well as from the task distribution. It accepts a candidate goal $g$ from state $s$ only if

$$\max_a Q(s,a,g,m) > -\kappa H,$$

where $H$ is the episode length and $\kappa \in (0,1]$ is a margin. Under the $-1$-per-step reward, $-Q$ approximates the expected number of steps to reach $g$, so the test asks whether this body is predicted to reach the goal within a fraction $\kappa$ of an episode. The intended effect is a cross-body curriculum. Bodies that turn the valve far share those angles as targets for bodies that have not yet explored there, while angles a two-finger hand cannot achieve are filtered out rather than chased.

The safety gate. A later state $s_{t'}$ may serve as the relabeled goal for an earlier transition $t$ only if the segment from $t$ to $t'$ recorded no joint-limit, velocity or current violation under ROBEL's safety counters. Unsafe segments stay in the buffer with their original failing labels. This stops relabeling from rewarding a goal reached by slamming a joint into its stop, and it does so without adding a hand-weighted penalty term.

Hardware check. The largest held-out configurations stay in simulation. On hardware we physically assemble a two-finger and a three-finger D'Claw variant and run the simulation-trained policy on Turn. We measure sparse success and violation counts, and do not fine-tune on hardware.

Baselines

Naive reference. The same learner and architecture receive the sparse reward with no relabeling. By analogy with the Fetch results in Hindsight Experience Replay, where DDPG without relabeling failed completely, we expect near-zero success on distant goals. This baseline confirms the tasks are genuinely sparse.

Hand-engineering reference. Per-configuration dense rewards follow ROBEL's shaped rewards for Turn and Pose. Each training body gets a coefficient sweep of equal size, and each body gets a separate policy trained with the same total environment steps as our shared policy. This is the practice we claim to replace. A variant trains one shared policy on the unchanged ROBEL reward, which tests the fixed reward trap directly. For the strongest baseline number: no reported result found on Lacuna for D'Claw Turn or Pose success under dense reward, so we will produce these numbers ourselves under a matched budget. The only related reported figures are HER's near-100% simulated Pick-and-Place and 5/5 real Pick-and-Place on Fetch, which is a different robot and task. Beating this baseline means equal or higher sparse success on training bodies, higher zero-shot success on held-out bodies, and lower violations per episode, all with no per-body tuning.

Strongest competitor. A shared morphology-conditioned policy uses ordinary within-episode relabeling and no archive or gates. It is the obvious minimal extension of HER to many bodies, and it already avoids the unreachable-goal problem. The full method must beat it on sample efficiency or held-out success by more than seed variance across at least five seeds, with identical steps, network size and tuning budget.

Ablations isolating the key ingredient. Four variants separate the effects:

  • pooled archive without the reachability gate, which should expose value overestimation on weak bodies;
  • reachability gate without the safety gate;
  • safety gate without cross-body sharing;
  • a sweep of $\kappa$.

Expensive alternative. A language-model reward designer in the style of RoboMoRe gets one generated reward per training body, trained with the same learner. Language-model calls are reported separately. This baseline runs on the three-finger subset only, because its cost scales with the number of bodies.

Why not just…?

Why not just hand-tune a shaped reward for each configuration? For a handful of bodies this is feasible, and it is the baseline we most need to beat honestly. Three things make it doubtful. The HER paper found shaping produced worse policies than sparse rewards on Fetch. ROBEL found shaped policies systematically violating hardware limits. Its cost grows with every new body. The held-out evaluation is the decisive part, because a per-body reward simply does not exist for an unseen configuration. If per-body shaping still wins on training bodies with fewer violations, we will report that sparse learning buys generality at a cost.

Why not just use shared HER with standard within-episode relabeling? This is the real threat. It is correct by construction and requires nothing new. The ablation ladder above settles whether pooled, gated goals improve on it. We expect gains mainly on bodies with narrow workspaces early in training, where their own exploration covers few valve angles. If no gain appears, the paper's contribution narrows to showing that sparse relabeling across bodies replaces reward engineering. The goal-sharing claim would be withdrawn.

Why not just terminate episodes or add a penalty on limit violations instead of gating relabeling? Both are cheap, and we run both as ablations of the safety gate. A penalty reintroduces a hand-set weight, which is exactly the kind of coefficient ROBEL and the locomotion literature show is fragile. Termination discards the safe prefix of an episode. The safety gate keeps the whole episode but withholds only the rewards that unsafe paths would have earned. Its advantage should appear as equal success with fewer violations; if termination matches it, we will say so.

Why not just ask a language model to write per-body rewards, as RoboMoRe does? RoboMoRe reports large locomotion gains, such as Ant efficiency of about 31,000 against 68 for the human template. That result came with repeated retraining per body, and nothing constrained it to hardware limits. Our matched-subset comparison measures success, violations and total compute. The language-model designer could plausibly win on success. We regard sparse relabeling as preferable only if it comes close while needing no per-body design step and generalizing to held-out bodies.

Why not just use the module-graph policy with model-based trajectory optimization? That approach generalizes across bodies, but it was shown on dense velocity tracking, and its authors report a mismatch between prediction accuracy and task performance. We include it as a secondary baseline on Pose, where a distance-based planning objective is natural. We expect it to struggle on sparse Turn goals.

Decisive Checks

The main result is a plot of sparse success against environment steps, for training bodies and for held-out bodies separately, showing all baselines. Next to it we report ROBEL's joint, velocity and current violation counts per episode.

Two diagnostics test the stated mechanisms. The first is the calibration of $-Q$ against the actual number of steps to reach the goal, broken down by body. The ungated pooled variant should show overestimation on two-finger hands; the gated one should not. The second is archive coverage: the range of valve angles each body attempts over training.

The hardware check on the two physically built variants reports success out of trials and violation counts. It is judged against a policy trained on ROBEL's dense reward for the same assembled hands.

The proposal succeeds if the sparse, gated, shared policy matches per-body shaping on training bodies, clearly exceeds it on held-out bodies, and lowers violations. The goal-sharing component survives only if it beats the plain shared-HER competitor.