As it turns out, the partitioning algorithm was leading, through our filtering requirements, to many equivalent values. (An extreme case: 5 1 2 generated 17,360 configurations, but only 340 of them are unique.)
I implemented a Show typeclass instance for CandidateConfiguration that encodes in base-64, which should be sufficient because even low numbers of colours, e.g. 10, are time consuming to handle. CandidateConfigurations are now converted into strings and stored in a set to check for repetitions, in which case, we discard them.
As it turns out, the partitioning algorithm was leading, through our filtering requirements, to many equivalent values. (An extreme case: 5 1 2 generated 17,360 configurations, but only 340 of them are unique.)
I implemented a
Show
typeclass instance forCandidateConfiguration
that encodes in base-64, which should be sufficient because even low numbers of colours, e.g. 10, are time consuming to handle.CandidateConfiguration
s are now converted intostring
s and stored in aset
to check for repetitions, in which case, we discard them.