(step_cost=-0.1)
| 124 | |
| 125 | |
| 126 | def negative_grid(step_cost=-0.1): |
| 127 | # in this game we want to try to minimize the number of moves |
| 128 | # so we will penalize every move |
| 129 | g = standard_grid() |
| 130 | g.rewards.update({ |
| 131 | (0, 0): step_cost, |
| 132 | (0, 1): step_cost, |
| 133 | (0, 2): step_cost, |
| 134 | (1, 0): step_cost, |
| 135 | (1, 2): step_cost, |
| 136 | (2, 0): step_cost, |
| 137 | (2, 1): step_cost, |
| 138 | (2, 2): step_cost, |
| 139 | (2, 3): step_cost, |
| 140 | }) |
| 141 | return g |
| 142 | |
| 143 | |
| 144 |
no test coverage detected