grid graph weight linear increment after each iteration