EvoScore: LLM-Guided Evolutionary Program Search for Online Two-Dimensional Strip-Packing Heuristics
Abstract
Online two-dimensional rectangular strip packing (2D-OSPP) requires placing sequentially arriving items into a fixed-width, unbounded-height strip to maximize utilization without lookahead or repositioning. Because no single heuristic dominates across all item distributions and sequence lengths, tailoring rules to specific classes is crucial yet typically manual. We present EvoScore, an LLM-guided evolutionary program-search framework that automatically synthesizes interpretable scoring heuristics for specific 2D-OSPP classes. Building on FunSearch, EvoScore decouples MaxRects corner-placement generation from scoring functions that evaluate each candidate with access to the full candidate set for normalization and ranking. It adds four extensions: (1) classical warm starts across five seed heuristics, (2) dynamic model switching among low-cost LLMs upon stagnation or malformed outputs, (3) context-conditioned prompting with item-distribution summaries, and (4) a held-out validation floor that deploys evolved rules only when they beat the best seed on unseen validation episodes. Across 72 synthetic classes (7,200 paired test episodes), EvoScore achieves 0.8472 mean utilization, outperforming eleven classical baselines and standard FunSearch (0.8433) and winning 60 of 72 classes against the strongest class-specific competitor. Evolved heuristics generally retain seed objectives while adding compact, interpretable tie-breaking terms. On real-world logistics data, evolving on fitted distribution summaries performs within one percentage point of evolving directly on raw item streams for long episodes, enabling privacy-preserving heuristic synthesis.
Figures & tables
| Heuristic | Primary criterion (best first) | Tie-break | Looks at other candidates? |
|---|---|---|---|
| Bottom-Left [ 3 ] | lowest | lowest | no |
| Best-Fit [ 7 ] | smallest increase of the current strip height | lowest , then lowest | no (uses placed items) |
| Lowest-Top (MaxRects-BL criterion, normalized form) [ 20 ] | lowest top edge , normalized over the candidate set | lowest | yes (normalization) |
| Max-Contact [ 20 , 30 ] | longest perimeter shared with the strip walls and the edges of placed items | none | no (uses placed items) |
| Relative-Rank (MaxRects-BL criterion, rank form) [ 52 ] | rank of top edge among candidates | rank of among candidates | yes (ranks) |
| Factor | Levels |
|---|---|
| Aspect ratio mean ( ) | square 1.0, moderate 2.0, elongated 4.0 |
| Aspect ratio std. deviation | low 0.1, high 1.0 |
| Item width mean | small , medium , large |
| Item width std. deviation | low , high |
| Episode length | 10, 100 items |
| Factor | Distribution |
|---|---|
| Aspect ratio ( ) | N(0.71, 0.18); range [0.40, 1.0] |
| Item width | N( ); range [ , ] |
| Episode length | two levels: 10, 100 items |
| Rank | Method | Mean | Median | Q25 | Q75 | vs. EvoScore | L / T / W vs. EvoScore | |
|---|---|---|---|---|---|---|---|---|
| 1 | EvoScore (ours) | 0.8472 | 0.8901 | 0.8010 | 0.9179 | — | — (reference) | — |
| 2 | FunSearch | 0.8433 | 0.8843 | 0.7972 | 0.9142 | 2623 / 3052 / 1525 | yes | |
| 3 | Lowest-Top (MaxRects-BL criterion) | 0.8348 | 0.8767 | 0.7837 | 0.9093 | 3964 / 1791 / 1445 | yes | |
| 4 | Relative-Rank (MaxRects-BL criterion) | 0.8343 | 0.8742 | 0.7828 | 0.9048 | 3705 / 2405 / 1090 | yes | |
| 5 | RP-MaxRects-BL | 0.8342 | 0.8744 | 0.7823 | 0.9050 | 3726 / 2401 / 1073 | yes | |
| 6 | Best-Fit | 0.8337 | 0.8725 | 0.7811 | 0.9045 | 3795 / 2446 / 959 | yes |
| Dimension | Level | #classes | EvoScore | Best baseline (marginal) | vs. best | EvoScore wins | mean /class |
|---|---|---|---|---|---|---|---|
| Mean aspect ratio ( ) | square | 24 | 0.8054 | 0.7927 (RP-MaxRects-BL) | 18/24 | ||
| moderate | 24 | 0.8474 | 0.8356 (Lowest-Top) | 21/24 | |||
| elongated | 24 | 0.8889 | 0.8776 (Lowest-Top) | 21/24 | |||
| Mean item width | small | 24 | 0.7969 | 0.7846 (Best-Fit) | 19/24 | ||
| medium | 24 | 0.8532 | 0.8417 (Lowest-Top) | 22/24 | |||
| large | 24 | 0.8916 | 0.8835 (Lowest-Top) | 19/24 |
| Method | ||
|---|---|---|
| EvoScore-direct (ours) | 0.7406 | 0.8997 |
| EvoScore-fitted (ours) | 0.7269 | 0.8964 |
| FunSearch-direct | 0.7282 | 0.8913 |
| FunSearch-fitted | 0.7215 | 0.8847 |
| Relative-Rank | 0.7317 | 0.8838 |
| RP-MaxRects-BL | 0.7315 | 0.8830 |
Automated Heuristic Design
Automated heuristic design creates or adapts problem-solving rules for optimization, planning, scheduling, and related search tasks.
See all 98 papers