Hybrid algorithms for constraint satisfaction problems