How othello-hackhive/othello works
Othello solves the Cable Ring Challenge: it reads a floor plan, assigns eligible rooms and nodes to the fewest hubs, builds closed axis-aligned cable rings through openings, independently checks the design, and emits official JSON plus overlay data. The tree also contains a browser-based ResPlan optimizer and visualization. The README establishes the end-to-end product stages; source-index references support many internal links, but unsampled backend entry-point wiring is not asserted beyond documented relationships.
Main entry points: validate.py Independent checker · outer.py Hub-count search · official.py Official JSON · App.tsx Optimization UI
Components 25
Browser optimizer
- Optimization UI
frontend/src/App.tsx - ResPlan parser
frontend/src/lib/resplan.ts - Browser optimizer
frontend/src/lib/optimizer.ts - Twin scene
frontend/src/components/TwinScene.tsx
Plan and configuration
- Plan reader
src/othello/reader/load_plan.py - Plan statistics
src/othello/reader/stats.py - Solver settings
src/othello/io/settings.py - Domain contracts
src/othello/models/plan.py - Rules and limits
src/othello/models/config.py
Design search
- Hub-count search
src/othello/solver/outer.py - Room partitions
src/othello/territory/partitions.py - Hub candidates
src/othello/solver/hub_candidates.py - Node orders
src/othello/solver/node_orders.py - Route selection
src/othello/solver/route_selection.py - Design improvement
src/othello/solver/improvement.py
Geometry and routing
- Rectilinear graph
src/othello/routing/grid.py - A* routing
src/othello/routing/astar.py - Route library
src/othello/routing/route_library.py
Validation and output
- Independent checker
src/othello/checker/validate.py - Geometry checks
src/othello/checker/geometry.py - Score metrics
src/othello/checker/metrics.py - Validation result
src/othello/models/result.py - Official JSON
src/othello/io/official.py - Overlay output
src/othello/io/overlay.py
Other components
- Plan operator
Connections 33
- Plan operator → Optimization UI: uploads plan
frontend/src/App.tsx - Optimization UI → ResPlan parser: loads plan
frontend/src/App.tsx - Optimization UI → Browser optimizer: runs optimizer
frontend/src/App.tsx - Browser optimizer → ResPlan parser: uses parser
frontend/src/lib/optimizer.ts - Optimization UI → Twin scene: renders scene
frontend/src/App.tsx - Plan operator → Plan reader: provides floor plan
- Plan reader → Domain contracts: creates plan
src/othello/reader/load_plan.py - Plan reader → Plan statistics: supports statistics
src/othello/reader/stats.py - Solver settings → Rules and limits: loads configuration
src/othello/io/settings.py - Hub-count search → Room partitions: considers assignments
src/othello/solver/outer.py - Hub-count search → Hub candidates: requests candidates
src/othello/solver/outer.py - Hub-count search → Node orders: requests orders
src/othello/solver/outer.py - Hub-count search → Route selection: selects routes
src/othello/solver/outer.py - Design improvement → Hub candidates: reuses candidates
src/othello/solver/improvement.py - Design improvement → Node orders: reuses orders
src/othello/solver/improvement.py - Design improvement → Route selection: searches alternatives
src/othello/solver/improvement.py - Node orders → A* routing: routes estimates
src/othello/solver/node_orders.py - Route selection → Route library: builds route options
src/othello/solver/route_selection.py - Route library → Rectilinear graph: uses routing graph
src/othello/routing/route_library.py - Route library → A* routing: searches paths
src/othello/routing/route_library.py - Rectilinear graph → Domain contracts: reads plan geometry
src/othello/routing/grid.py - Independent checker → Geometry checks: checks geometry
src/othello/checker/validate.py - Independent checker → Score metrics: computes score
src/othello/checker/validate.py - Independent checker → Validation result: returns validation
src/othello/checker/validate.py - Hub-count search → Independent checker: verifies design
- Route selection → Independent checker: checks candidates
- Official JSON → Independent checker: validates output
src/othello/io/official.py - Official JSON → Domain contracts: serializes design
src/othello/io/official.py - Overlay output → Official JSON: uses official data
src/othello/io/overlay.py - Overlay output → Score metrics: adds score data
src/othello/io/overlay.py - Independent checker → Official JSON: supplies verified design
src/othello/io/official.py - Official JSON → Plan operator: writes official JSON
- Overlay output → Plan operator: writes overlay