```
1 2 3 4 5
|---|---|---|-----|---|---|
| | > | v | | | 5 |
| > | ^ | > | (>) | z | 4 |
| ^ | | | ^ | | 3 |
| ^ | > | > | ^ | | 2 |
| a | ^ | | | | 1 |
|---|---|---|-----|---|---|
```

Let say we have a GRID like the one above.

I want to create **score** for paths, where every next step has a lower discounted value.

F.e. let start with score with range (1,0), step 1:start (1,1) is 0.9, step2:up (1,2) 0.81, step3:up (1,3) 0.73, ….

and store the update Score in every cell.

The first problem is if the path is too many steps the latter steps will have very small values.

Second most important is if paths overlap, the next path will screw the score of the previous path. F.e. cell(4,4)

One solution is for every path to have its own lookup table but this will take too much memory.

I want to reuse the grid for all the paths, something like Reinforcement Learning but in the opposite direction, from start to end.

Whats your idea ?