Commit Graph

14 Commits

Author SHA1 Message Date
yexiaozhou
c61dfb60e8 (layout optimizer) update README.md 2026-04-13 10:25:51 +08:00
yexiaozhou
99dc821a01 refactor(layout_optimizer): DE optimizer — discrete angles, strategy fixes, decoupled mutation, API exposure
- Extract _compute_mutant helper with circular angle diff (fixes 0/2π boundary bug)
- Fix currenttobest1bin (remove non-standard noise term), add rand1bin strategy
- Decoupled mutation: independent F ranges for position vs theta
- Configurable crossover mode: per-device (default) or per-dimension
- Discrete angle snapping in normal 3N DE (joint mode, replaces hybrid as default)
- Stop auto-injecting prefer_orientation_mode into DE
- Expose DE hyperparameters (mutation, theta_mutation, recombination, strategy, angle_mode) via API
2026-04-10 14:41:13 +08:00
yexiaozhou
a7a6d77d7a fix(layout_optimizer): apply code review follow-ups 2026-04-03 01:42:22 +08:00
yexiaozhou
00bdf9b822 feat(layout_optimizer): add angle-first hybrid discrete-theta mode 2026-04-03 01:09:00 +08:00
yexiaozhou
306b787aa7 fix(layout_optimizer): update arm_slider reach value and improve scene poll version handling 2026-04-03 00:43:40 +08:00
yexiaozhou
5b3f317867 Merge branch 'rescue-layout-opt-detached' into feat/3d_layout_and_visualize 2026-04-02 16:32:27 +08:00
yexiaozhou
b0e98ccf2b docs(layout_optimizer): deprecate align_weight in demo_agent.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 13:52:18 +08:00
yexiaozhou
b04dc8dd4a feat(layout_optimizer): default cardinal snap and alignment to off
align_weight defaults to 0 (was DEFAULT_WEIGHT_ANGLE=60).
snap_theta_safe is opt-in via snap_cardinal=True (was always-on).
Both remain available when explicitly requested.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 13:48:34 +08:00
yexiaozhou
f4c0e40a25 feat(layout_optimizer): crossing penalty weighted by intersection length
Replace _line_of_sight_penalty (flat per-blocker) with _crossing_penalty
(DEFAULT_WEIGHT_DISTANCE * crossing_length). Uses opening→arm-OBB
endpoints. Applied regardless of reachability pass/fail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 13:33:38 +08:00
yexiaozhou
569ac4a931 feat(layout_optimizer): add segment_obb_intersection_length (Cyrus-Beck clipping)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 13:24:45 +08:00
yexiaozhou
31e79e9aff chore(DE): add debug mode and detailed log regarding cost changes 2026-04-02 12:52:44 +08:00
yexiaozhou
6e1b26a754 fix(server): update path configuration for asset directories 2026-04-01 22:07:44 +08:00
yexiaozhou
9ef24b7768 feat(layout_optimizer): DE optimizer V2 — custom loop, graduated hard constraints, broad phase
Replace scipy differential_evolution with custom DE loop for per-device
crossover, circular θ wrapping, and configurable mutation strategy
(currenttobest1bin default, best1bin as turbo mode).

Key improvements:
- Graduate ALL hard constraints during DE (proportional penalty instead of
  flat inf), giving DE smooth gradient for reachability, min_spacing, etc.
  Binary inf preserved for final pass/fail reporting.
- 2-axis sweep-and-prune AABB broad phase for collision pair pruning
- Multi-seed injection from multiple seeder presets + Gaussian variants
- snap_theta_safe: collision-check after angle snapping, revert on violation
- Weight normalization (100 distance / 60 angle / 5× hard multiplier)
- Constraint priority field (critical/high/normal/low → weight multiplier)
  with LLM intent interpreter setting priority per constraint type
- Final success field now checks user hard constraints in binary mode
- arm_slider added to mock checker reach table (1.07m)

Tests: 202 passed, 24 new tests added (optimizer 7, constraints 6, broad_phase 11)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 00:32:34 +08:00
yexiaozhou
64eeed56a1 feat: add layout_optimizer package for automatic layout of devices
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 09:30:40 +08:00