Skip to content

Commit

Permalink
fix maze problem
Browse files Browse the repository at this point in the history
  • Loading branch information
MorvanZhou committed Nov 26, 2018
1 parent 0b4da19 commit 6077858
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions contents/2_Q_Learning_maze/maze_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ def _build_maze(self):

# create grids
for c in range(0, MAZE_W * UNIT, UNIT):
x0, y0, x1, y1 = c, 0, c, MAZE_W * UNIT
x0, y0, x1, y1 = c, 0, c, MAZE_H * UNIT
self.canvas.create_line(x0, y0, x1, y1)
for r in range(0, MAZE_H * UNIT, UNIT):
x0, y0, x1, y1 = 0, r, MAZE_H * UNIT, r
x0, y0, x1, y1 = 0, r, MAZE_W * UNIT, r
self.canvas.create_line(x0, y0, x1, y1)

# create origin
Expand Down
2 changes: 1 addition & 1 deletion contents/3_Sarsa_maze/maze_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _build_maze(self):
x0, y0, x1, y1 = c, 0, c, MAZE_H * UNIT
self.canvas.create_line(x0, y0, x1, y1)
for r in range(0, MAZE_H * UNIT, UNIT):
x0, y0, x1, y1 = 0, r, MAZE_H * UNIT, r
x0, y0, x1, y1 = 0, r, MAZE_W * UNIT, r
self.canvas.create_line(x0, y0, x1, y1)

# create origin
Expand Down
2 changes: 1 addition & 1 deletion contents/4_Sarsa_lambda_maze/maze_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _build_maze(self):
x0, y0, x1, y1 = c, 0, c, MAZE_H * UNIT
self.canvas.create_line(x0, y0, x1, y1)
for r in range(0, MAZE_H * UNIT, UNIT):
x0, y0, x1, y1 = 0, r, MAZE_H * UNIT, r
x0, y0, x1, y1 = 0, r, MAZE_W * UNIT, r
self.canvas.create_line(x0, y0, x1, y1)

# create origin
Expand Down
2 changes: 1 addition & 1 deletion contents/5_Deep_Q_Network/maze_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _build_maze(self):
x0, y0, x1, y1 = c, 0, c, MAZE_H * UNIT
self.canvas.create_line(x0, y0, x1, y1)
for r in range(0, MAZE_H * UNIT, UNIT):
x0, y0, x1, y1 = 0, r, MAZE_H * UNIT, r
x0, y0, x1, y1 = 0, r, MAZE_W * UNIT, r
self.canvas.create_line(x0, y0, x1, y1)

# create origin
Expand Down

0 comments on commit 6077858

Please sign in to comment.