Implemented the reannealing algorithm (calculation of states space size pendant)
Working version of re-annealing