From d90c2d284ed2b9e28b9bbcb89b4473b926f1d0a7 Mon Sep 17 00:00:00 2001 From: tetrapod54 <75597364+tetrapod54@users.noreply.github.com> Date: Mon, 28 Jun 2021 15:07:09 +0900 Subject: [PATCH] [short_path] Define num_nodes in compute_to_go --- lectures/short_path.md | 1 + 1 file changed, 1 insertion(+) diff --git a/lectures/short_path.md b/lectures/short_path.md index bd49a06f8..0ae0ebdd1 100644 --- a/lectures/short_path.md +++ b/lectures/short_path.md @@ -428,6 +428,7 @@ def bellman(J, Q): def compute_cost_to_go(Q): + num_nodes = Q.shape[0] J = np.zeros(num_nodes) # Initial guess next_J = np.empty(num_nodes) # Stores updated guess max_iter = 500