The code for it is here.
It looks quite simple. Only changing colors of points, no edge flips. Trying different random changes. Why inside one iteration do we keep decreasing the number of colors changed like this:
for (int i=1;i<=getnum(T);i++)c[rnd()%n+1]=rnd()%3;
?
where T goes (T = T_Max=1e4; T > T0=0.0001; T *= delta=0.9995) and
int getnum(double x){ return (int)log(x+1)/2+1; }
?
And what is the second case in which we make the change tested in this if
statement:
if ((val>kkk||exp((double)(val-kkk)/T)>((double)rnd()/rnd.max()))&&kkk!=1e9){ for (int i=1;i<=n;i++)a[i]=c[i]; }
?