new paint algorithm. Needs further tuning

see paint_with_hint.cpp