Andy Nguyen GitHub →
Semiconductor fab floor planning

Layout
Optimization

Polygon placement algorithm for maximizing floor space efficiency

Industry context

The semiconductor
fab floor

A modern fabrication facility houses hundreds of precision manufacturing tools. Each tool occupies a defined physical footprint — and how they are arranged directly affects throughput, worker routing, and operational cost.

Getting the layout right is a planning problem with real stakes.

TOP-DOWN VIEW — FAB FLOOR
The challenge

Place more tools.
Overlap nothing.

Each tool's footprint is modeled as a polygon. The problem: fit as many polygons as possible into a fixed floor area, with no two polygons occupying the same space.

No overlap Varied shapes Maximize utilization 2D top-down
The approach

Rule-based. Sequential. Explainable.

01

Heuristic

Each polygon is placed one at a time following explicit rules. No black box — every decision is traceable and auditable.

02

Sequential

Placement decisions are discrete. Add, remove, or reorder rules without retraining or reconfiguring a model.

03

Auditable

Domain experts can validate and adjust placement behavior without needing to touch underlying code.

Core algorithm

Place.
Check. Commit.

  1. 01

    Pull from queueTake the next polygon in priority order.

  2. 02

    Scan positionsTest candidate positions top-to-bottom, left-to-right.

  3. 03

    Check overlapAt each position, test against all placed polygons.

  4. 04

    CommitFirst valid position with no overlap → place the polygon.

  5. 05

    RepeatContinue until the queue is empty or the floor is full.

testing SCAN →
Flexibility

Rules the team
can own.

The algorithm's behavior is driven by explicit, readable rules — not learned weights. Planners can validate results, adjust strategy, and extend the system without a data scientist in the loop every time.

placement_config.yaml
priority_order largest_first
preferred_zones tool_type → zone
min_spacing 0.5 m between classes
rotation per_tool_class
scan_direction top_left → bottom_right
Interactive demo

Watch it work.

Tools placed: 0  ·  Space: 0%
Impact

Measurable improvement.

+30% Space efficiency
1 wk → 1 day Planning time

A solution that planners could understand, validate, and build on — without needing a data scientist in the room every time.