Far be it for me to suggest modifying their algorithm... But...
- If you used variable sized centred windows (4,6,8,10) and calculated the weight for each window. There will be a window size where the weight flips. This might suggest an improvement to the heursistic where the state is constant for two scales in a row.
- Another approach might be to perturb the center point of the window by 1 position in all 8 directions and take the majority weight in the 8x8 case. I did not calculate this - just a hunch.
But I think the first may work better...