Zig-Zag Numberlink is more than just a puzzle, it is an abstraction of the spatial routing challenges faced in real-world domains such as Multi-Agent Pathfinding (MAPF) and Very Large Scale Integration (VLSI) design. Traditionally, Zig-Zag Numberlink has been treated purely as a Constraint Satisfaction Problem (CSP), resulting in the use of highly optimised Boolean logic frameworks such as Boolean satisfiability (SAT) or Zero-suppressed Binary Decision Diagrams (ZDD). While these approaches outperform Integer Linear Programming (ILP) in raw speed for discrete puzzles, they suffer from two distinct disadvantages: they lack the flexibility to handle continuous constraints and frequently produce structurally undesirable solutions.
Using ILP, this research reframes the puzzle as a Constraint Optimisation Problem (COP). By encoding human intuition into linear mathematical objective functions (Border Adherence and Path Straightness), this approach actively guides the solver toward structurally superior assignments. Extensive benchmarks consisting of both procedurally generated and human-designed datasets demonstrate that heuristic guidance drastically reduces the Branch-and-Bound (B&B) search tree. The Border Adherence objective function successfully mitigates the exponential complexity explosion seen at the phase transition, reducing the median B&B node count from over 2,500 to just 1 in the critical region, and scaling significantly better on larger grids (15 × 15) when compared to feasibility focused models. This dissertation proves that pursuing optimality over feasibility, although paradoxical, yields more stable convergence in highly complex spaces, and also produces the structurally idealistic routing that is often mandatory for solutions to real-world problems.