Skip to content

domino oracle: generator-faithful place sampler + InFront name precedence#43

Merged
yichao-liang merged 1 commit into
masterfrom
domino-oracle-fix
Jun 30, 2026
Merged

domino oracle: generator-faithful place sampler + InFront name precedence#43
yichao-liang merged 1 commit into
masterfrom
domino-oracle-fix

Conversation

@yichao-liang

@yichao-liang yichao-liang commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

Two independent fixes to the open-loop oracle_process_planning demonstrator on pybullet_domino, taking it from 3/5 to 5/5 on seed 0. This is distinct from the agent_bilevel domino path fixed in #42 — it targets the oracle demonstrator's grid-process place sampler and predicate setup.

1. Generator-faithful rank-sum place sampler — ground_truth_models/domino/processes.py::_place_sampler

The sampler read the bare grid cell — a uniform lattice that omits the task generator's inward domino_width/2 corner offset, so a turn block landed on the same cell a straight block would and corner cascades stalled. It now enumerates the generator-faithful candidate placements (_generator_placements, which carry the corner offset) and rank-sums three signals — future-target bridge, planner grid-cell distance, planner angle error — to pick the cascade-correct pose deterministically (top-ranked on ≥2 of 3; falls back to the bare cell only if no candidate exists).

2. Helper-predicate name precedence — approaches/process_planning_approach.py::__init__

The env's position-based InFront (a Predicate) and the grid's derived InFront (a DerivedPredicate) are ==-equal but hash differently, so a plain helpers | base set union kept both; abstract() then evaluated the looser position-based one, hallucinating adjacencies (e.g. the start block "in front of" a staged movable 13 cm away) that let the planner build a physically-impossible single-block bridge to the target. Now drop any base predicate whose name a helper already provides before the union, so the derived InFront fully replaces the position-based one.

Results

Open-loop oracle_process_planning (bilevel_plan_without_sim) on pybullet_domino, 10 test tasks × seeds 0–4 — the same task set, run with vs. without these fixes (baseline = master 95239a7, the parent of this change):

Seed Without fix With fix Δ
0 3 / 10 7 / 10 +4
1 6 / 10 8 / 10 +2
2 6 / 10 8 / 10 +2
3 4 / 10 7 / 10 +3
4 1 / 10 5 / 10 +4
Total 20 / 50 (40%) 35 / 50 (70%) +15

Both runs have zero crashes or timeouts (num_solve_failures = num_execution_failures = num_*_timeouts = 0 for every seed) — every miss is a cascade that executed cleanly but fell short of toppling the target, so the fix converts 15 of those "policy failed to reach goal" cases into solves. The remaining 15 misses are the long tail (harder layouts where staging geometry overlaps the chain region / occasional Pick collisions), which needs a task-generator change beyond this PR.

yapf · isort (5.10.1) · docformatter · mypy (1.8.0) · pylint all pass.

…me precedence

Takes the open-loop oracle_process_planning demonstrator from 3/5 to 5/5 on
pybullet_domino seed 0 (verified: 5/5, 0 solve/exec failures):

- _place_sampler (domino/processes.py): rank-sum three signals (future-target
  bridge, planner grid-cell distance, planner angle error) over the
  generator-faithful candidate placements and pick the cascade-correct pose,
  instead of the bare grid cell -- which omits the generator's inward
  domino_width/2 corner offset and stalls corner cascades.
- BilevelProcessPlanningApproach.__init__: drop any base predicate whose name a
  helper already provides before unioning, so the grid's derived InFront fully
  replaces the env's position-based InFront. A plain set union kept both
  (==-equal but different hashes) and abstract() evaluated the looser position
  one, enabling a physically-impossible single-block bridge to the target.
@yichao-liang yichao-liang merged commit 0d22d98 into master Jun 30, 2026
14 checks passed
@yichao-liang yichao-liang changed the title domino oracle: rank-sum place sampler + InFront name precedence (3/5 → 5/5) domino oracle: generator-faithful place sampler + InFront name precedence Jun 30, 2026
@yichao-liang

Copy link
Copy Markdown
Collaborator Author

Added a no-fix baseline to the results table above — same 50 tasks (10 × seeds 0–4), run on master 95239a7 (this change's parent): 20/50 (40%) without → 35/50 (70%) with the fix (+15 solves; zero crashes/timeouts in either run, so the fix turns 15 cascade-fell-short misses into solves).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant