Fixed grid world reward function