Local entropy as a measure for sampling solutions in constraint satisfaction problems