diff --git a/search.ipynb b/search.ipynb index d3dc3cca7..72300557e 100644 --- a/search.ipynb +++ b/search.ipynb @@ -1623,7 +1623,7 @@ " elif limit >= 0:\n", " cutoff_occurred = True\n", " limit += 1\n", - " all_node_color.pop()\n", + " all_node_colors.pop()\n", " iterations -= 1\n", " node_colors[node.state] = \"gray\"\n", "\n", @@ -2162,6 +2162,8 @@ "outputs": [], "source": [ "# Heuristics for 8 Puzzle Problem\n", + "import math\n", + "\n", "def linear(node):\n", " return sum([1 if node.state[i] != goal[i] else 0 for i in range(8)])\n", "\n", @@ -2853,7 +2855,7 @@ " neighbor = argmax_random_tie(neighbors,\n", " key=lambda node: problem.value(node.state))\n", " if problem.value(neighbor.state) <= problem.value(current.state):\n", - " \"\"\"Note that it is based on negative path cost method\"\"\"\n", + " \"\"\"Note that it is based on negative path cost method\"\"\"\n", " current.state = neighbor.state\n", " iterations -= 1\n", " \n", @@ -6527,7 +6529,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.6.4" + "version": "3.7.6" }, "widgets": { "state": { @@ -6561,8 +6563,17 @@ } }, "version": "1.2.0" + }, + "pycharm": { + "stem_cell": { + "cell_type": "raw", + "source": [], + "metadata": { + "collapsed": false + } + } } }, "nbformat": 4, "nbformat_minor": 1 -} +} \ No newline at end of file