Find the best route through a randomly initialized grid

This is a demo to show how to do an efficient search. The problen is to find path with the highest score

The score for a path is the sum of all the cell values on the path. The path starts from the top left and finishes at the bottom right cell. Each step on the path can ove either right or down one cell.

There are more paths (10 ^ 300) through this grid than there are atoms in the universe, To find the best path requires a little more finesse than a brute force search. But the actual problem is much easer beacuse we randomly initialize the cells. So even a random path is not too bad. We can usually do better by using a simple heuristic, at each point move to the cell with the highest score. But the best route is much tricker.

Cell Value Range: (1 - 100) Use the slider below to change the value range
All the cells in the grid below will ib initialized randomly with values in that range.



Show the scored for earh type of path.
randon path score:
0
huristic path score:
0
best path score:
0
average cell value:
0
expected random:
0
expected heuristic:
0