From f357ea55009cf0a7d1fded9bd15a2955d35198c7 Mon Sep 17 00:00:00 2001 From: Keith Chester Date: Mon, 21 Dec 2020 18:00:40 -0800 Subject: [PATCH] fix: state => state1 The book correctly refers to this as `state1`, whereas here it just overrides `state`. With no `state1` declared, this will just error out. --- Chapter 3/Ch3_book.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Chapter 3/Ch3_book.ipynb b/Chapter 3/Ch3_book.ipynb index bced552..a8cf989 100644 --- a/Chapter 3/Ch3_book.ipynb +++ b/Chapter 3/Ch3_book.ipynb @@ -141,7 +141,7 @@ "for i in range(epochs): #B\n", " game = Gridworld(size=4, mode='static') #C\n", " state_ = game.board.render_np().reshape(1,64) + np.random.rand(1,64)/10.0 #D\n", - " state = torch.from_numpy(state_).float() #E\n", + " state1 = torch.from_numpy(state_).float() #E\n", " status = 1 #F\n", " while(status == 1): #G\n", " qval = model(state1) #H\n",