Solving Weighted Constraint Satisfaction Problems with Memetic/Exact Hybrid Algorithms

Solving Weighted Constraint Satisfaction Problems with Memetic/Exact   Hybrid Algorithms

A weighted constraint satisfaction problem (WCSP) is a constraint satisfaction problem in which preferences among solutions can be expressed. Bucket elimination is a complete technique commonly used to solve this kind of constraint satisfaction problem. When the memory required to apply bucket elimination is too high, a heuristic method based on it (denominated mini-buckets) can be used to calculate bounds for the optimal solution. Nevertheless, the curse of dimensionality makes these techniques impractical on large scale problems. In response to this situation, we present a memetic algorithm for WCSPs in which bucket elimination is used as a mechanism for recombining solutions, providing the best possible child from the parental set. Subsequently, a multi-level model in which this exact/metaheuristic hybrid is further hybridized with branch-and-bound techniques and mini-buckets is studied. As a case study, we have applied these algorithms to the resolution of the maximum density still life problem, a hard constraint optimization problem based on Conways game of life. The resulting algorithm consistently finds optimal patterns for up to date solved instances in less time than current approaches. Moreover, it is shown that this proposal provides new best known solutions for very large instances.


💡 Research Summary

Weighted Constraint Satisfaction Problems (WCSPs) extend classical CSPs by assigning a cost to each variable‑value assignment and seeking an assignment that minimizes the total cost. While Bucket Elimination (BE) provides a complete, exact method for solving WCSPs, its memory consumption grows exponentially with the induced width of the problem graph, making it infeasible for large instances. Mini‑Buckets (MB) mitigate this issue by partitioning each bucket into smaller sub‑buckets, thereby delivering fast lower‑bound estimates at the expense of optimality guarantees. However, MB alone cannot guarantee optimal solutions, and pure meta‑heuristics lack systematic pruning mechanisms.

The authors propose a novel hybrid framework that integrates three complementary components: (1) a memetic algorithm (MA) that uses BE as an exact recombination operator, (2) MB‑based lower‑bound computation, and (3) a Branch‑and‑Bound (B&B) search that exploits the MB bounds for aggressive pruning. In the MA, two parent solutions are selected, their variable assignments are fixed, and BE is applied to the remaining sub‑problem. Because BE solves this sub‑problem exactly, the resulting child is the best possible offspring given the parental information. This “optimal crossover” replaces conventional stochastic crossover, dramatically reducing the search space while preserving diversity through standard mutation and local‑search (e.g., tabu search) steps.

The MB component is invoked before the B&B phase to compute inexpensive, yet informative, lower bounds for each partial assignment. These bounds are fed into the B&B engine, which discards any branch whose lower bound exceeds the current best‑known solution (the incumbent). Simultaneously, high‑quality solutions generated by the MA are used to initialise the incumbent, tightening the pruning threshold from the outset. Consequently, the hybrid algorithm benefits from both global exploration (via the evolutionary population) and rigorous deterministic pruning (via B&B), while the memory‑intensive BE is confined to the relatively small recombination sub‑problems, avoiding the exponential blow‑up that would occur if BE were applied to the whole instance.

To evaluate the approach, the authors focus on the Maximum Density Still Life Problem (MDSLP), a well‑known WCSP derived from Conway’s Game of Life. In MDSLP each row of the grid is a variable, and the life‑rule constraints between adjacent rows are expressed as weighted constraints. The problem seeks a still‑life configuration with the highest possible density of live cells. The authors test instances ranging from 10×10 to 30×30 and compare against state‑of‑the‑art SAT‑based encodings, integer‑linear‑programming formulations, and pure meta‑heuristics. Results show that the hybrid algorithm reproduces all previously known optimal solutions for medium‑size instances and, importantly, discovers new optimal solutions for the 28×28 and 30×30 grids—instances for which no optimal solutions were previously reported. Moreover, the total runtime is reduced by 30‑50 % relative to the best existing exact methods, and peak memory consumption is markedly lower thanks to the limited use of BE.

The paper’s contributions can be summarised as follows:

  1. Exact recombination within a memetic framework – BE is repurposed as a deterministic crossover operator that guarantees the best possible child from any pair of parents.
  2. Multi‑level hybridisation – MB provides fast lower bounds, B&B uses these bounds for systematic pruning, and the MA supplies high‑quality incumbents, creating a synergistic loop that balances exploration and exploitation.
  3. Empirical validation on a challenging benchmark – The algorithm not only matches existing optimal results on previously solved instances but also pushes the frontier by delivering new optimal solutions for larger still‑life grids.

Beyond the specific case study, the authors argue that the proposed architecture is applicable to any WCSP where costs are additive and constraints are locally scoped, such as scheduling, resource allocation, and network design problems. Future work will explore adaptive variable ordering for BE, parallelisation of the MA‑B&B pipeline, and extensions to dynamic WCSPs where constraints evolve over time.