Skip to content

Commit 4020468

Browse files
committed
Correct the learned-heuristic timings, and say what gripper's seed does
The README's transfer table quoted 0.038 / 0.561 / 0.169 seconds. The cache the published Research view renders from -- promo/rl-data.json, transfer_after -- says 0.0365 / 0.5337 / 0.1542. Expansions and costs in the same three rows match the cache exactly, so the wall-clock column alone came from a run nobody kept. A test pins the page to that cache; nothing pinned this table, so it drifted. generate_gripper takes a seed and, alone among the generators, never builds an rng from it: in gripper every ball starts in room A, so size and grippers determine the instance completely and the seed reaches only the problem name. Worth a docstring rather than a fix, because the trap is silent -- a train/test split that varies the seed at a fixed size hands you the same instance twice.
1 parent dbdc25a commit 4020468

3 files changed

Lines changed: 21 additions & 9 deletions

File tree

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -344,13 +344,15 @@ seen, against greedy best-first search:
344344

345345
| heuristic | coverage | expansions | seconds | plan cost |
346346
|---|---|---|---|---|
347-
| **`learned`** | 1.00 | **137** | **0.038** | **48.2** |
348-
| `hff` | 1.00 | 518 | 0.561 | 51.8 |
349-
| `goalcount` | 1.00 | 2483 | 0.169 | 51.0 |
350-
351-
Nearly four times fewer expansions than `hff` and fifteen times faster, because
352-
the network is a thousand multiply-adds and `hff` is a relaxed-plan extraction.
353-
Those are the numbers the command above prints, on one CPU, in about a minute.
347+
| **`learned`** | 1.00 | **137** | **0.036** | **48.2** |
348+
| `hff` | 1.00 | 518 | 0.534 | 51.8 |
349+
| `goalcount` | 1.00 | 2483 | 0.154 | 51.0 |
350+
351+
Nearly four times fewer expansions than `hff` and about fifteen times faster,
352+
because the network is a thousand multiply-adds and `hff` is a relaxed-plan
353+
extraction. These are read from `promo/rl-data.json`, the cache the published
354+
[Research view](https://openplan-labs.github.io/PythonPDDL/) renders from, so
355+
the page and this table cannot drift apart.
354356

355357
It does not always win — on logistics it loses to `hff` by 6× and the reason is
356358
exact rather than mysterious: that domain has two predicates, so the feature

jupyddl/generator.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,17 @@ def generate_blocksworld(size: int = 6, seed: int = 0):
164164

165165

166166
def generate_gripper(size: int = 4, seed: int = 0, grippers: int = 2):
167-
"""``size`` balls to move from room A to room B. Plan length grows linearly."""
167+
"""``size`` balls to move from room A to room B. Plan length grows linearly.
168+
169+
Unlike every other generator here, ``seed`` does not vary the instance:
170+
in gripper every ball starts in room A and must end in room B, so
171+
``size`` and ``grippers`` determine the problem completely. The seed
172+
reaches only the problem name, which keeps generated files distinct.
173+
174+
The consequence is worth stating because it is easy to miss: a
175+
train/test split that varies the seed and holds the size fixed produces
176+
the *same instance* twice for this domain. Vary ``size`` instead.
177+
"""
168178
balls = _objects("ball", max(1, size))
169179
hands = _objects("gripper", max(1, grippers))
170180
init = ["(at-robby rooma)"]

web/dist/jupyddl-sources.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)