Skip to content

Commit

Permalink
fix ch18 bug in gridworld.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rasbt committed Nov 6, 2019
1 parent 02901d7 commit b6f1552
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
7 changes: 3 additions & 4 deletions ch18/ch18.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,7 @@
"\n",
" # Agent --> square or robot\n",
" if (os.path.exists('robot-coordinates.pkl') and CELL_SIZE == 100):\n",
" agent_coord\n",
" s = pickle.load(\n",
" agent_coords = pickle.load(\n",
" open('robot-coordinates.pkl', 'rb'))\n",
" starting_coords = get_coords(0, 0, loc='center')\n",
" agent_coords += np.array(starting_coords)\n",
Expand Down Expand Up @@ -1203,9 +1202,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.4"
"version": "3.7.1"
}
},
"nbformat": 4,
"nbformat_minor": 2
"nbformat_minor": 4
}
3 changes: 1 addition & 2 deletions ch18/gridworld/gridworld_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ def _build_display(self, gold_cell, trap_cells):

# Agent --> square or robot
if (os.path.exists('robot-coordinates.pkl') and CELL_SIZE == 100):
agent_coord
s = pickle.load(
agent_coords = pickle.load(
open('robot-coordinates.pkl', 'rb'))
starting_coords = get_coords(0, 0, loc='center')
agent_coords += np.array(starting_coords)
Expand Down

0 comments on commit b6f1552

Please sign in to comment.