Network-based heuristics for constraint-satisfaction problems