I found the duplication state might be happen at
void simulation::depth_first_search(state* initial)
...
if (s->board()->areas()->pop(&a)) {
if (a->size() < 3) {
delete a;
continue;
}
state* p = new state(s, *a);
GRAPH(s, &a->point(), p);
stack.push(p);
delete a;
continue;
}
I think you should check the new state whether or not duplication before stack.push(p).
if duplication, skip.
I found the duplication state might be happen at
I think you should check the new state whether or not duplication before stack.push(p).
if duplication, skip.