Projects / Genplan -- EA + RL Floorplan Pipeline

Genplan -- EA + RL Floorplan Pipeline

archivedPython

Hybrid Evolutionary Algorithm + Reinforcement Learning coursework pipeline for constraint-aware architectural floorplan generation from natural-language instructions: an epsilon-greedy bandit chooses how each EA run is seeded. The original EA+RL vs EA-only comparison turned out to be confounded, so its headline result is under review.

STATUSarchived
LANGUAGEPython
STACKPython · Evolutionary Algorithms · Reinforcement Learning · OpenCV · HuggingFace · NumPy
RESULTS (UNDER REVIEW)
  • Reported in the coursework: EA+RL reached lower final fitness than EA-only in 419 of 500 paired runs (83.8%), with a 6.96% median improvement.
  • A later code review found the comparison confounded: the fitness includes a mask term scoring distance to the ground-truth room layout, 456 of the 500 EA+RL runs used a seeder that starts from that mask, and the EA-only baseline always used a seeder that ignores it. The bandit was also trained on the same 10 evaluation floorplans, and EA+RL runs had ~48% more wall-clock time.
  • The 500 runs are 10 floorplans with ~50 repeats each, not 500 independent samples. A fair re-run (best fixed seeder as baseline, held-out floorplans, equal compute, a per-floorplan test) is needed before drawing conclusions.
  • Coursework research report included (COMP1827, ~1,500 words).
ARCHITECTURE
  • Epsilon-greedy Multi-Armed Bandit (rl_bandit.py) selects among five registered seeding strategies (seeders.py); bandit state persists across runs for repeatability.
  • Constraint scoring and penalties: quadrant, overlap, compactness, adjacency, room usage, relationships, hole detection and more (constraints.py).
  • Fitness realism gate: a heuristic (rule-based, untrained) realism score in real_plan_classifier.py penalises implausible layouts (fitness.py).
  • Preprocessing extracts room polygons via OpenCV edge detection; grid_encoder.py converts the processed metadata to EA-ready grids/masks.
  • Natural-language → structured constraints parser (text_to_support_text.py).