# Finding happiness by evolutionary algorithms

**Authors:** Mohammad Hadi Shekarriz, Dhananjay Thiruvady, Asef Nazari

arXiv: 2508.20934 · 2025-12-08

## TL;DR

This paper introduces a memetic algorithm combining genetic algorithms and local search to effectively solve the NP-hard soft happy colouring problem, improving solutions over traditional methods in graph community detection.

## Contribution

It develops a novel hybrid memetic algorithm tailored for soft happy colouring, demonstrating superior performance over existing local search and genetic algorithms.

## Key findings

- Memetic algorithm outperforms local search and genetic algorithms.
- Effective diversification of solutions through learning and evolution.
- High-quality solutions achieved on stochastic block model graphs.

## Abstract

A recent line of research concerns the problem of soft happy colouring (SHC), which requires that a partially coloured graph be extended to a complete colouring to maximise local agreements, so that as many vertices as possible end up surrounded by enough same-coloured neighbours. It is already known that SHC is NP-hard, and its solutions have a direct relationship with the community structure of networks; thus, it has immense applications in security and resilience. Past studies have shown that local search approaches can be fast and effective to an extent on the SHC; however, they often get stuck in local optima. Regarding the related problem of maximising happy vertices, evolutionary approaches have been proven effective; hence, this study develops a customised memetic algorithm that is a hybrid of genetic algorithms and local search. The experimental evaluation on a range of graphs in the stochastic block model shows that the memetic algorithm can achieve excellent results in search for an optimised solution to SHC compared to the local search approaches and standard genetic algorithms. Moreover, learning and evolution in the memetic algorithm allow diversification of solutions generated by fast, effective local search approaches, which prove superior for the challenging problem of community detection.

---
Source: https://tomesphere.com/paper/2508.20934