Skip to content

Commit 6077858

Browse files
committed
fix maze problem
1 parent 0b4da19 commit 6077858

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

contents/2_Q_Learning_maze/maze_env.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ def _build_maze(self):
4242

4343
# create grids
4444
for c in range(0, MAZE_W * UNIT, UNIT):
45-
x0, y0, x1, y1 = c, 0, c, MAZE_W * UNIT
45+
x0, y0, x1, y1 = c, 0, c, MAZE_H * UNIT
4646
self.canvas.create_line(x0, y0, x1, y1)
4747
for r in range(0, MAZE_H * UNIT, UNIT):
48-
x0, y0, x1, y1 = 0, r, MAZE_H * UNIT, r
48+
x0, y0, x1, y1 = 0, r, MAZE_W * UNIT, r
4949
self.canvas.create_line(x0, y0, x1, y1)
5050

5151
# create origin

contents/3_Sarsa_maze/maze_env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def _build_maze(self):
4646
x0, y0, x1, y1 = c, 0, c, MAZE_H * UNIT
4747
self.canvas.create_line(x0, y0, x1, y1)
4848
for r in range(0, MAZE_H * UNIT, UNIT):
49-
x0, y0, x1, y1 = 0, r, MAZE_H * UNIT, r
49+
x0, y0, x1, y1 = 0, r, MAZE_W * UNIT, r
5050
self.canvas.create_line(x0, y0, x1, y1)
5151

5252
# create origin

contents/4_Sarsa_lambda_maze/maze_env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def _build_maze(self):
4646
x0, y0, x1, y1 = c, 0, c, MAZE_H * UNIT
4747
self.canvas.create_line(x0, y0, x1, y1)
4848
for r in range(0, MAZE_H * UNIT, UNIT):
49-
x0, y0, x1, y1 = 0, r, MAZE_H * UNIT, r
49+
x0, y0, x1, y1 = 0, r, MAZE_W * UNIT, r
5050
self.canvas.create_line(x0, y0, x1, y1)
5151

5252
# create origin

contents/5_Deep_Q_Network/maze_env.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def _build_maze(self):
4444
x0, y0, x1, y1 = c, 0, c, MAZE_H * UNIT
4545
self.canvas.create_line(x0, y0, x1, y1)
4646
for r in range(0, MAZE_H * UNIT, UNIT):
47-
x0, y0, x1, y1 = 0, r, MAZE_H * UNIT, r
47+
x0, y0, x1, y1 = 0, r, MAZE_W * UNIT, r
4848
self.canvas.create_line(x0, y0, x1, y1)
4949

5050
# create origin

0 commit comments

Comments
 (0)